Heroku Gem doesn't work after installing it

喜欢而已 提交于 2019-12-06 11:23:31

问题


I am trying to get heroku running on Ubuntu 9.10

I typed

sudo gem install heroku

and everything works fine but then when I go to run:

heroku list

I get

heroku: command not found


回答1:


run gem enviroment and look where is the EXECUTABLE DIRECTORY and add it to your PATH

In my case:

$ 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

or add to ~/.bashrc




回答2:


I was using RVM, and my problem turned out to be the following:

  • I had installed heroku using 'sudo'
  • I should have installed heroku as the current user, without 'sudo'

Found here: http://www.ruby-forum.com/topic/217493



来源:https://stackoverflow.com/questions/2396004/heroku-gem-doesnt-work-after-installing-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!