我想在Ubuntu 9.10上运行heroku
我打字
sudo gem install heroku
一切正常,但是当我去跑步时:
heroku list
我得到了
heroku:找不到命令
答案 0 :(得分:10)
运行 gem环境并查看 EXECUTABLE DIRECTORY 的位置,并将其添加到路径
就我而言:
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
- INSTALLATION DIRECTORY: /var/lib/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /var/lib/gems/1.8
- /home/user/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org/
$ export PATH=$PATH:/var/lib/gems/1.8/bin
或添加到〜/ .bashrc
答案 1 :(得分:1)
我使用的是RVM,我的问题结果如下: