0
gem list

说我有

导轨(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

任何可能的解决方案?

4

1 回答 1

0

首先你应该告诉你安装 ruby​​ 和 rails 的步骤。

利用

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

检查是否存在 rvm 要求..

rvm 要求

然后使用

gem install rails -v 版本

你也可以参考

https://rvm.io/

于 2013-04-25T05:57:10.650 回答