ruby – 在[](Gem :: LoadError)中找不到heroku(> = 0)

前端之家收集整理的这篇文章主要介绍了ruby – 在[](Gem :: LoadError)中找不到heroku(> = 0)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
微克.我刚刚从 Windows 7安装迁移到Lion系统.我正在尝试自学 Ruby on Rails,虽然我喜欢这种语言,但环境却让人感到脆弱和神秘.我使用相同的命令在两个系统上安装heroku,但System X系统对安装不满意.

在System X上我使用了rvm,这可能是我的问题.

什么控制Gems的安装位置?

如何让heroku运行起来?什么会阻止下一个宝石丢失?

$sudo gem install heroku
...

$heroku -v

~/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find heroku (>= 0) amongst [minitest-1.6.0,rake-0.8.7,rdoc-2.5.8] (Gem::LoadError)
    from /Users/aliwells26/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
    from /Users/aliwells26/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:1210:in `gem'
    from /Users/aliwells26/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/bin/heroku:18:in `<main>'

$gem environment
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.11
  - RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-darwin11.2.0]
  - INSTALLATION DIRECTORY: /Users/aliwells26/.rvm/gems/ruby-1.9.2-p290@rails3tutorial
  - RUBY EXECUTABLE: /Users/aliwells26/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/aliwells26/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-11
  - GEM PATHS:
     - /Users/aliwells26/.rvm/gems/ruby-1.9.2-p290@rails3tutorial
     - /Users/aliwells26/.rvm/gems/ruby-1.9.2-p290@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

$echo $PATH
/Users/aliwells26/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/bin:/Users/aliwells26/.rvm/bin:/Users/aliwells26/.rvm/gems/ruby-1.9.2-p290/gems/rails-3.1.1/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/local/git/bin

解决方法

这可能很有用.它适用于我的环境.
rvmsudo gem install heroku

见:Could not find rails (>= 0) amongst [] (Gem::LoadError)

猜你在找的Ruby相关文章