Heroku Gem doesn't work after installing it

柔情痞子 提交于 2019-12-04 16:20:10

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

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

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