Rails3 和 Bundler 1.0.0
Rails3 and Bundler 1.0.0
这两天一直在兜兜转转。我正在将应用程序从 Rails 2.3.12 升级到 Rails 3.0.0。它在 ruby 1.9.3.
我正在慢慢地完成 vendor/plugins 并将它们更新为相关的 gem。
我的问题是这样的:当我尝试 运行 服务器时我得到这个错误:
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/rack-1.2.8/lib/rack/builder.rb:35: stack level too deep (SystemStackError)
经过大量搜索后,我明白这可能是因为我运行正在使用旧版本的 Rack (1.2.8)。然后我尝试更新它并收到此错误:
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (~> 1.0.0) ruby
Current Bundler version:
bundler (1.8.2)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
为什么我要在我的 Gemfile 中指定 bundler (~> 1.0.0)?由于此错误:
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 3.0.0) ruby depends on
bundler (~> 1.0.0) ruby
Current Bundler version:
bundler (1.8.2)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
但是我今天早些时候遇到了这个问题,我知道我可以使用这个捆绑更新和捆绑安装:
bundle _1.0.22_ install
强制它使用它需要的捆绑器版本(仅在 Gemfile 中指定它是不够的,正如您在上面的错误中看到的...)
所以我用那个。但它不再有效并给我这个错误:
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/source.rb:253:in `fetch_all_remote_specs': undefined method `list' for #<Gem::SpecFetcher:0x007fe9eba00d98> (NoMethodError)
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/source.rb:234:in `block in remote_specs'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/source.rb:231:in `each'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/source.rb:231:in `remote_specs'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/source.rb:165:in `fetch_specs'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/source.rb:70:in `specs'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/definition.rb:176:in `block (2 levels) in index'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/definition.rb:175:in `each'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/definition.rb:175:in `block in index'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/index.rb:7:in `build'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/definition.rb:174:in `index'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/definition.rb:168:in `resolve'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/definition.rb:107:in `specs'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/definition.rb:102:in `resolve_remotely!'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/installer.rb:43:in `run'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/installer.rb:8:in `install'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/cli.rb:219:in `install'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/vendor/thor/task.rb:22:in `run'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/vendor/thor.rb:263:in `dispatch'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/vendor/thor/base.rb:386:in `start'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/bin/bundle:13:in `<top (required)>'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/bin/bundle:23:in `load'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/bin/bundle:23:in `<main>'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/bin/ruby_executable_hooks:15:in `eval'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/bin/ruby_executable_hooks:15:in `<main>'
我在这里发现的所有其他与此相关的问题在错误中都有一个额外的行,说明 gem 正在破坏它......我没有,所以不知道如何开始弄清楚这一点。
我是不是给自己挖了一个深坑,再也出不来了?有没有人对如何开始解决这个问题有任何想法或建议? Rails 3 显然想要 Bundler 1.0.22,但我看到的每个答案都告诉我升级 Bundler!
以防万一有人认为他们能解决这个问题,这是我的gem文件:
source 'https://rubygems.org'
gem "rails", "3.0.0"
#need to replace old acts_as_commentable vendor plugin
gem 'acts_as_commentable', '3.0.1'
gem "airbrake"
#need to add authlogic gem
gem 'authlogic', '~> 2.1.6'
gem "aws-s3"
gem "bj"
gem "bundler", "~> 1.0.0"
gem "calendar_date_select", "1.15"
gem "cancan", "1.2.0"
gem "carmen"
#replace plugin casein?
gem 'casein', '3.1.0'
gem 'comma', '0.4.1'
gem 'exifr'
# factory_girl 1.2.4 wasn't working with Rails 3 - consider an upgrade to factory_girl_rails?
# gem "factory_girl", "1.2.4"
gem 'fastercsv'
gem "geokit"
#need to replace above with below
gem 'geokit-rails'
gem "haml"
gem "hpricot"
gem 'hoptoad_notifier'
gem "jrails"
gem "libxml-ruby", "2.4.0"
gem "memcached", "~> 1.8.0"
#memcached no longer works?
gem 'dalli'
# Not sure why we have this if we're using SQLite3
gem "mysql2", "~> 0.2.6"
#TODO: changed by almazom
#adding gem rack to force update? - cvk
gem 'rack', '1.6.0'
gem "rake", "0.8.4"
gem 'recurly'
gem "rdoc"
gem "rmagick"
gem "rspreedly"
gem "rubyzip"
gem 'sass'
# searchlogic not supported for rails3
# gem 'searchlogic'
gem 'rd_searchlogic', :require => 'searchlogic'
#need to use simplecov when upgrading to ruby 2 as rcov doesn't work
gem "simplecov"
gem 'sqlite3'
# tmail no longer included in rails 3?
gem 'tmail'
#need to upgrade will_paginate for casein...?
# gem "will_paginate", "2.3.16"
gem 'will_paginate', '3.0.4'
gem 'yaml_db'
group :development, :test do
gem 'test-unit', '1.2.3'
gem 'rspec', '1.3.2'
gem 'rspec-rails', '~> 1.3.4'
end
group :test do
gem 'capybara', '0.3.5'
gem 'cucumber', '1.1.2'
gem 'cucumber-rails', :require => false
gem 'database_cleaner'
end
提前致谢!
您可以再次尝试将 Rails 更新为 3.0.3
和 运行 bundle install
。
3.0.0
和 3.0.3
之间没有太多区别,但是 3.0.3
对捆绑器 ~> 1.0
的依赖性更宽松(参见:RubyGems.org).
此外,我建议从您的 Gemfile
中删除 bundler,因为无论如何它都是 Rails 的依赖项。
这两天一直在兜兜转转。我正在将应用程序从 Rails 2.3.12 升级到 Rails 3.0.0。它在 ruby 1.9.3.
我正在慢慢地完成 vendor/plugins 并将它们更新为相关的 gem。
我的问题是这样的:当我尝试 运行 服务器时我得到这个错误:
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/rack-1.2.8/lib/rack/builder.rb:35: stack level too deep (SystemStackError)
经过大量搜索后,我明白这可能是因为我运行正在使用旧版本的 Rack (1.2.8)。然后我尝试更新它并收到此错误:
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (~> 1.0.0) ruby
Current Bundler version:
bundler (1.8.2)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
为什么我要在我的 Gemfile 中指定 bundler (~> 1.0.0)?由于此错误:
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 3.0.0) ruby depends on
bundler (~> 1.0.0) ruby
Current Bundler version:
bundler (1.8.2)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
但是我今天早些时候遇到了这个问题,我知道我可以使用这个捆绑更新和捆绑安装:
bundle _1.0.22_ install
强制它使用它需要的捆绑器版本(仅在 Gemfile 中指定它是不够的,正如您在上面的错误中看到的...)
所以我用那个。但它不再有效并给我这个错误:
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/source.rb:253:in `fetch_all_remote_specs': undefined method `list' for #<Gem::SpecFetcher:0x007fe9eba00d98> (NoMethodError)
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/source.rb:234:in `block in remote_specs'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/source.rb:231:in `each'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/source.rb:231:in `remote_specs'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/source.rb:165:in `fetch_specs'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/source.rb:70:in `specs'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/definition.rb:176:in `block (2 levels) in index'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/definition.rb:175:in `each'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/definition.rb:175:in `block in index'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/index.rb:7:in `build'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/definition.rb:174:in `index'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/definition.rb:168:in `resolve'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/definition.rb:107:in `specs'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/definition.rb:102:in `resolve_remotely!'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/installer.rb:43:in `run'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/installer.rb:8:in `install'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/cli.rb:219:in `install'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/vendor/thor/task.rb:22:in `run'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/vendor/thor.rb:263:in `dispatch'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/lib/bundler/vendor/thor/base.rb:386:in `start'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/bundler-1.0.22/bin/bundle:13:in `<top (required)>'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/bin/bundle:23:in `load'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/bin/bundle:23:in `<main>'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/bin/ruby_executable_hooks:15:in `eval'
from /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/bin/ruby_executable_hooks:15:in `<main>'
我在这里发现的所有其他与此相关的问题在错误中都有一个额外的行,说明 gem 正在破坏它......我没有,所以不知道如何开始弄清楚这一点。
我是不是给自己挖了一个深坑,再也出不来了?有没有人对如何开始解决这个问题有任何想法或建议? Rails 3 显然想要 Bundler 1.0.22,但我看到的每个答案都告诉我升级 Bundler!
以防万一有人认为他们能解决这个问题,这是我的gem文件:
source 'https://rubygems.org'
gem "rails", "3.0.0"
#need to replace old acts_as_commentable vendor plugin
gem 'acts_as_commentable', '3.0.1'
gem "airbrake"
#need to add authlogic gem
gem 'authlogic', '~> 2.1.6'
gem "aws-s3"
gem "bj"
gem "bundler", "~> 1.0.0"
gem "calendar_date_select", "1.15"
gem "cancan", "1.2.0"
gem "carmen"
#replace plugin casein?
gem 'casein', '3.1.0'
gem 'comma', '0.4.1'
gem 'exifr'
# factory_girl 1.2.4 wasn't working with Rails 3 - consider an upgrade to factory_girl_rails?
# gem "factory_girl", "1.2.4"
gem 'fastercsv'
gem "geokit"
#need to replace above with below
gem 'geokit-rails'
gem "haml"
gem "hpricot"
gem 'hoptoad_notifier'
gem "jrails"
gem "libxml-ruby", "2.4.0"
gem "memcached", "~> 1.8.0"
#memcached no longer works?
gem 'dalli'
# Not sure why we have this if we're using SQLite3
gem "mysql2", "~> 0.2.6"
#TODO: changed by almazom
#adding gem rack to force update? - cvk
gem 'rack', '1.6.0'
gem "rake", "0.8.4"
gem 'recurly'
gem "rdoc"
gem "rmagick"
gem "rspreedly"
gem "rubyzip"
gem 'sass'
# searchlogic not supported for rails3
# gem 'searchlogic'
gem 'rd_searchlogic', :require => 'searchlogic'
#need to use simplecov when upgrading to ruby 2 as rcov doesn't work
gem "simplecov"
gem 'sqlite3'
# tmail no longer included in rails 3?
gem 'tmail'
#need to upgrade will_paginate for casein...?
# gem "will_paginate", "2.3.16"
gem 'will_paginate', '3.0.4'
gem 'yaml_db'
group :development, :test do
gem 'test-unit', '1.2.3'
gem 'rspec', '1.3.2'
gem 'rspec-rails', '~> 1.3.4'
end
group :test do
gem 'capybara', '0.3.5'
gem 'cucumber', '1.1.2'
gem 'cucumber-rails', :require => false
gem 'database_cleaner'
end
提前致谢!
您可以再次尝试将 Rails 更新为 3.0.3
和 运行 bundle install
。
3.0.0
和 3.0.3
之间没有太多区别,但是 3.0.3
对捆绑器 ~> 1.0
的依赖性更宽松(参见:RubyGems.org).
此外,我建议从您的 Gemfile
中删除 bundler,因为无论如何它都是 Rails 的依赖项。