Rails -v给出了错误

时间:2013-04-25 04:25:06

标签: ruby-on-rails

gem list

我说

rails(2.3.5,2.3.2)

但是当我给出

rails -v 

它吐出错误

/usr/local/lib/site_ruby/1.8/rubygems.rb:578:in `report_activate_error': Could not find RubyGem test-spec (>= 0) (Gem::LoadError)
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:134:in `activate'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:158:in `activate'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:157:in `each'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:157:in `activate'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:158:in `activate'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:157:in `each'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:157:in `activate'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:158:in `activate'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:157:in `each'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:157:in `activate'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:49:in `gem'
    from /usr/bin/rails:18

任何可能的解决方案?

1 个答案:

答案 0 :(得分:0)

首先,您应该告诉您安装ruby和rails的步骤..

使用

  

$ \ curl -L https://get.rvm.io | bash -s stable --rails   --autolibs =启用#或, - ruby​​ = 1.9.3

检查是否有rvm要求..

  

rvm要求

然后使用

  

gem install rails -v version

你也可以参考

  

https://rvm.io/