Ruby on rails Rails3和捆扎机1.0.0

Ruby on rails Rails3和捆扎机1.0.0,ruby-on-rails,ruby,ruby-on-rails-3,bundler,Ruby On Rails,Ruby,Ruby On Rails 3,Bundler,在过去的两天里,我一直在兜圈子。我正在将一个应用程序从Rails 2.3.12升级到Rails 3.0.0。它在ruby 1.9.3上 我正在慢慢地通过供应商/插件进行工作,并将它们更新到相关的gems 我的问题是:当我尝试运行服务器时,出现以下错误: /Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/rack-1.2.8/lib/rack/builder.rb:35: stack level too deep (SystemStack

在过去的两天里,我一直在兜圈子。我正在将一个应用程序从Rails 2.3.12升级到Rails 3.0.0。它在ruby 1.9.3上

我正在慢慢地通过供应商/插件进行工作,并将它们更新到相关的gems

我的问题是:当我尝试运行服务器时,出现以下错误:

/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)
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`?
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`?
经过多次搜索,我明白这可能是因为我运行的是旧版本的Rack(1.2.8)。然后我尝试更新此内容,但出现以下错误:

/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)
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`?
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`?
为什么我要在文件中指定bundler(~>1.0.0)?由于此错误:

/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)
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`?
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
要强制它使用所需的bundler版本(仅在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>'

提前谢谢

您可以尝试将Rails更新为
3.0.3
,然后再次运行
bundle install

3.0.0
3.0.3
之间没有太多区别,但是
3.0.3
对bundler
~>1.0
的依赖性更为宽松(请参见:)

此外,我建议将bundler从您的
Gemfile
中删除,因为它是Rails的一个依赖项。

谢谢,我认为这是有效的…至少我现在得到了一个完全不同的错误:-D