Installing Heroku Toolbelt on Centos 6.5

I am trying to install Heroku Toolbelt on our CentOS server and I cannot figure out how to figure it out. I have Ruby and Rubygems installed and functional and I was running offline download from the heroku start tutorial.

wget -qO- https://toolbelt.heroku.com/install.sh | sh 

      

Running 'whereis heroku' I get

heroku: /usr/local/heroku

      

and 'which heroku' outputs

/usr/local/heroku/bin/heroku

      

However, when I try to run "heroku login" I get

/usr/local/heroku/bin/heroku
/usr/local/heroku/lib/heroku/helpers.rb:13:in `home_directory': undefined method `home' for Dir:Class (NoMethodError)
    from /usr/local/heroku/lib/heroku/updater.rb:22:in `updated_client_path'
    from /usr/local/heroku/lib/heroku/updater.rb:170:in `inject_libpath'
    from /usr/local/heroku/bin/heroku:19

      

I can't find the same error for heroku on google and I'm not entirely sure what this error means. Thanks for the help!

UPDATE 6/22/15

Adding software versions

Centos: 6.5
Ruby: 1.9.3
Gems: 2.4.8

      

After upgrading to Ruby 1.9.3, I now get a different error.

Running "which heroku" now gives me the following error which heroku /usr/bin/which: no heroku in (/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/hugmungus/bin)

UPDATE 6/23/15

I tried to add this to my path by following the steps from this SF question , but I still get the same error when launching "Which hero

+3


source to share


2 answers


Ok, finally it works. Here are the steps I took:

STEP 1

Following Jeff Dickey's suggestion, I took a look and tried to install a newer version of ruby ​​(1.8.4 → 1.9.3), however using the wget method was not giving me good results. So I used RVM to upgrade to 2.1.0 using this article , here are the actual steps to install Ruby

Download development tools

yum groupinstall -y 'development tools'

      

Install RVM

curl -L get.rvm.io | bash -s stable  

      

If you get an error with a missing public key, run the first sentence from the installer and then run curl

gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

      

Add RVM to system path

source /etc/profile.d/rvm.sh

      

Restart RVM to secure it in transit and install ruby



rvm reload
rvm install 2.1.0 

      

After that, the ruby ​​will be installed.

STEP 2

Add Heroku to system path, I used this server error question to execute this

Find Heroku Location

whereis heroku

      

Add path

echo 'pathmunge <your heroku install path>' > /etc/profile.d/her.sh

      

Open permissions to allow execution

chmod +x /etc/profile.d/ree.sh

      

Log out and log back in and that's it. You can run this command after logging in to make sure it is added to the path.

echo $PATH

      

+3


source


you probably have an old version of ruby, upgrade to version 1.9 or higher



0


source







All Articles