需要帮助在os x上使用终端在rails上安装ruby

时间:2015-03-06 20:00:03

标签: ruby-on-rails ruby terminal install

我只是使用以下指南设置我的红宝石环境:http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/

没有错误,所以我转到下一个测试:http://installfest.railsbridge.org/installfest/create_a_rails_app

(所有这些步骤都列在odin项目中)

但是当我在rails服务器中键入终端时,我在终端中收到以下消息:

/Users/PeilongDu/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'actionpack' (= 4.2.0) among 75 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/PeilongDu/.rvm/gems/ruby-2.2.0:/Users/PeilongDu/.rvm/gems/ruby-2.2.0@global', execute `gem env` for more information
    from /Users/PeilongDu/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1311:in `block in activate_dependencies'
    from /Users/PeilongDu/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1300:in `each'
    from /Users/PeilongDu/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1300:in `activate_dependencies'
    from /Users/PeilongDu/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1282:in `activate'
    from /Users/PeilongDu/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:67:in `block in gem'
    from /Users/PeilongDu/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:66:in `synchronize'
    from /Users/PeilongDu/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:66:in `gem'
    from /Users/PeilongDu/.rvm/rubies/ruby-2.2.0/bin/rails:22:in `<main>'
    from /Users/PeilongDu/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
    from /Users/PeilongDu/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'

1 个答案:

答案 0 :(得分:2)

您可能想先尝试

gem install bundler

然后在Rails项目的目录中执行bundle install