#的未定义局部变量或方法`index'

时间:2012-02-06 19:50:35

标签: ruby-on-rails-3 ruby-on-rails-3.1 bundler

每件事情都运转良好,一旦我退出并登录我的系统,在我的系统上没有任何东西适用于Rails 3.1。在每个应用程序上它都会抛出相同的错误:

/home/nazar2/.rvm/gems/ruby-1.9.2-p290@rails3.1/gems/bundler-1.0.21/lib/bundler/definition.rb:151:in `resolve': undefined local variable or method `index' for #<Bundler::Definition:0x97a48d4> (NameError)
    from /home/nazar2/.rvm/gems/ruby-1.9.2-p290@rails3.1/gems/bundler-1.0.21/lib/bundler/definition.rb:90:in `specs'
    from /home/nazar2/.rvm/gems/ruby-1.9.2-p290@rails3.1/gems/bundler-1.0.21/lib/bundler/definition.rb:135:in `specs_for'
    from /home/nazar2/.rvm/gems/ruby-1.9.2-p290@rails3.1/gems/bundler-1.0.21/lib/bundler/definition.rb:124:in `requested_specs'
    from /home/nazar2/.rvm/gems/ruby-1.9.2-p290@rails3.1/gems/bundler-1.0.21/lib/bundler/environment.rb:23:in `requested_specs'
    from /home/nazar2/.rvm/gems/ruby-1.9.2-p290@rails3.1/gems/bundler-1.0.21/lib/bundler/runtime.rb:11:in `setup'
    from /home/nazar2/.rvm/gems/ruby-1.9.2-p290@rails3.1/gems/bundler-1.0.21/lib/bundler.rb:110:in `setup'
    from /home/nazar2/.rvm/gems/ruby-1.9.2-p290@rails3.1/gems/bundler-1.0.21/lib/bundler/setup.rb:7:in `<top (required)>'
    from /home/nazar2/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
    from /home/nazar2/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
    from /home/nazar2/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from /home/backup/Hub/clients/orthomind/new/orthomind/config/boot.rb:6:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from script/rails:5:in `<main>'

我陷入困境,无法弄清问题是什么。

1 个答案:

答案 0 :(得分:2)

刚刚更新到bundler宝石,每件事情都很完美。

gem install bundler --pre

我认为使用Rails3.1以前的Bundler gem版本存在一些问题