我有一个在Rails 2.3.14上运行的现有应用程序。我正在使用RVM设置我的环境以使用Ruby 1.8.7-p374,我安装了Rails 2.3.14,看起来好像我的安装不起作用。
我正在尝试通过运行rails -v
来验证我的Rails安装,但运行该命令会产生这样的结果:
/Users/jason/.rvm/gems/ruby-1.8.7-p374@global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:75:in `setup': undefined method `name' for #<Array:0x104f28960> (NoMethodError)
from /Users/jason/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `map'
from /Users/jason/.rvm/gems/ruby-1.8.7-p374@global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:75:in `each'
from /Users/jason/.rvm/gems/ruby-1.8.7-p374@global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:75:in `map'
from /Users/jason/.rvm/gems/ruby-1.8.7-p374@global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:75:in `setup'
from /Users/jason/.rvm/gems/ruby-1.8.7-p374@global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:114:in `check'
from /Users/jason/.rvm/gems/ruby-1.8.7-p374@global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:121
from /Users/jason/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:58:in `gem_original_require'
from /Users/jason/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:58:in `require'
from /Users/jason/.rvm/gems/ruby-1.8.7-p374@global/gems/rubygems-bundler-1.4.2/lib/rubygems_executable_plugin.rb:4
from /Users/jason/.rvm/gems/ruby-1.8.7-p374@global/gems/executable-hooks-1.2.6/lib/executable-hooks/hooks.rb:50:in `call'
from /Users/jason/.rvm/gems/ruby-1.8.7-p374@global/gems/executable-hooks-1.2.6/lib/executable-hooks/hooks.rb:50:in `run'
from /Users/jason/.rvm/gems/ruby-1.8.7-p374@global/gems/executable-hooks-1.2.6/lib/executable-hooks/hooks.rb:49:in `each'
from /Users/jason/.rvm/gems/ruby-1.8.7-p374@global/gems/executable-hooks-1.2.6/lib/executable-hooks/hooks.rb:49:in `run'
from /Users/jason/.rvm/gems/ruby-1.8.7-p374@leaselabs/bin/ruby_executable_hooks:10
答案 0 :(得分:1)
我已经解决了这个问题。 方法:rvm @global做gem uninstall bundler。