gpt4 book ai didi

ruby-on-rails - ZenTest 4.9.3 显示为无效的 gemspec

转载 作者:行者123 更新时间:2023-12-04 07:36:19 25 4
gpt4 key购买 nike

我在尝试运行 ZenTest 时不断收到此错误

Invalid gemspec in [/usr/local/rvm/gems/ruby-1.9.3-p194/specifications/ZenTest-4.9.3.gemspec]: Illformed requirement ["< 2.1, >= 1.8"].

我已经尝试删除 ZenTest 4.9.3 和 gem 安装 ZenTest 4.8.3,但是在任何存储库中都找不到该版本,所以它会自动安装 ZenTest 4.9.3,它一直有错误,因此我无法运行 spork 或自动测试。有没有办法解决?谢谢!

这是我的 gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.11'
gem 'spork'
gem 'rspec-core'
gem 'autotest', '4.4.6'
gem 'autotest-rails', '4.1.2'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

group :development, :test do
gem 'sqlite3'
gem 'rspec-rails'
gem 'webrat'
gem 'capybara'
gem 'Zentest', '4.8.3'
end
group :production do
gem 'pg'
end


# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby

gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'

最佳答案

我遇到了同样的问题。挖掘后,我找到了解决方案。问题很可能与系统中安装的 RubyGems 版本有关。 (它将是 <1.8.25)

直到那个版本,RubyGems didn't roundtrip gemspecs properly因此无法正确解析 "< 2.1, >= 1.8"。

因此,请执行以下步骤:

gem uninstall ZenTest
gem update --system
gem install ZenTest

问题应该得到解决,您应该不会再收到警告。

关于ruby-on-rails - ZenTest 4.9.3 显示为无效的 gemspec,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18342345/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com