未定义的局部变量或方法“index”对于#
发布于 2025-01-02 14:35:22 字数 2844 浏览 3 评论 0 原文

一切都工作正常,一旦我注销并登录回我的系统,我的系统上的 Rails 3.1 就不起作用了。在每个应用程序上,它都会抛出相同的错误:

/home/nazar2/.rvm/gems/[email protected]/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/[email protected]/gems/bundler-1.0.21/lib/bundler/definition.rb:90:in `specs'
    from /home/nazar2/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler/definition.rb:135:in `specs_for'
    from /home/nazar2/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler/definition.rb:124:in `requested_specs'
    from /home/nazar2/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler/environment.rb:23:in `requested_specs'
    from /home/nazar2/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler/runtime.rb:11:in `setup'
    from /home/nazar2/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler.rb:110:in `setup'
    from /home/nazar2/.rvm/gems/[email protected]/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>'

我被卡住了,无法弄清楚问题是什么。

Every thing was working fine and once I logout and login back to my system, nothing works for Rails 3.1 on my system. On every app it throws the same error:

/home/nazar2/.rvm/gems/[email protected]/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/[email protected]/gems/bundler-1.0.21/lib/bundler/definition.rb:90:in `specs'
    from /home/nazar2/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler/definition.rb:135:in `specs_for'
    from /home/nazar2/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler/definition.rb:124:in `requested_specs'
    from /home/nazar2/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler/environment.rb:23:in `requested_specs'
    from /home/nazar2/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler/runtime.rb:11:in `setup'
    from /home/nazar2/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler.rb:110:in `setup'
    from /home/nazar2/.rvm/gems/[email protected]/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>'

I am stuck and can't figure out what the issue is.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

始于初秋 2025-01-09 14:35:22

刚刚更新到 bundler gem,一切都工作得很好。

gem install bundler --pre

我认为以前的捆绑器 gem 版本与 Rails3.1 存在一些问题

Just updated to bundler gem and every things works perfectly fine.

gem install bundler --pre

I think there was some issue with previous bundler gem version with Rails3.1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文