Rails在Mac OSX 10.5.8上安装3.0.1

时间:2010-11-05 19:28:30

标签: ruby-on-rails

我已按照以下说明成功安装了Git和RVM:http://railstutorial.org/book#sec:install_rails 我按照安装导轨的说明进行了说明。这就是:

Rose-MBP:~ roseemmons$ rails -v
/Users/roseemmons/.rvm/gems/ruby-1.9.2-p0@global/specifications/rake-0.8.7.gemspec:27:in `load_specification': uninitialized constant Gem::VERSION (NameError)
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/specification.rb:540:in `initialize'
    from /Users/roseemmons/.rvm/gems/ruby-1.9.2-p0@global/specifications/rake-0.8.7.gemspec:3:in `new'
    from /Users/roseemmons/.rvm/gems/ruby-1.9.2-p0@global/specifications/rake-0.8.7.gemspec:3:in `load_specification'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/source_index.rb:86:in `load_specification'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/source_index.rb:122:in `load_gems_in'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/source_index.rb:121:in `each'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/source_index.rb:121:in `load_gems_in'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/source_index.rb:75:in `from_gems_in'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/source_index.rb:47:in `from_installed_gems'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:141:in `source_index'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:310:in `activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:65:in `active_gem_with_options'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:50:in `gem'
    from /usr/bin/rails:18
丑陋不是吗?我正在学习自己的RoR,所以我不知道这意味着什么或如何解决它。所有帮助表示赞赏!提前谢谢!

2 个答案:

答案 0 :(得分:1)

rvm - 默认使用1.9.2

将设置默认的ruby,以便您不必在每次启动终端时输入

答案 1 :(得分:0)

$ rvm使用1.9.2

显然RVM不记得此设置,因此每次启动终端时都必须输入它。