开发者

Heroku Gem doesn't work after installing it

开发者 https://www.devze.com 2022-12-21 23:51 出处:网络
I am trying 开发者_StackOverflow中文版to get heroku running on Ubuntu 9.10 I typed sudo gem install heroku

I am trying 开发者_StackOverflow中文版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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消