Ug中找不到heroku(> = 0)。我剛剛從Windows 7安裝遷移到Lion系統。我試圖自學Ruby on Rails,雖然我喜歡這種語言,但是這個環境感覺脆弱而神祕。我使用了相同的命令在兩個系統上安裝heroku,但System X系統對安裝並不滿意。在[](Gem :: LoadError)
On System X我使用了rvm,這可能是我的問題。
什麼控制寶石的安裝位置?
如何獲得並運行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/[email protected]/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/[email protected]
- RUBY EXECUTABLE: /Users/aliwells26/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
- EXECUTABLE DIRECTORY: /Users/aliwells26/.rvm/gems/[email protected]/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-11
- GEM PATHS:
- /Users/aliwells26/.rvm/gems/[email protected]
- /Users/aliwells26/.rvm/gems/[email protected]
- 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/[email protected]/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
嘗試'rvm use rails3tutorial','gem install heroku','heroku -v'。 –
使用'rvm'時不要'sudo gem install'。 –