Wednesday, November 18, 2009

Installing Heroku in Ubuntu 9.04 running on Dell Inspiron 1525

I recently installed Heroku for a personal project I am working on. To be clear, it wasnt pleasant getting Heroku up and running on Ubuntu, as I hit several roadblocks, and all information I needed wasnt present at one single place on the internet. So, I decided to document whatever I did for me and everybody else.

Please note that I tested this only on my Dell Inspiron 1525 laptop on which I am running Ubuntu 9.04.
  1. Updating system

    To update the repositories type in:

    sudo apt-get update
    sudo apt-get install build-essential

  2. Installing rails

    You need to have ruby installed on your system
    To install ruby, type in:

    sudo apt-get install ruby

    You can install rails either through gem or apt-get. I installed it using apt-get. You can do that by typing

    sudo apt-get install rails

  3. Installing heroku:

    For heroku you need to have gem installed, to install gem, using apt-get type:

    sudo apt-get install rubygems1.8

    Also, before installing heroku you need to install rubydev as directly installing heroku gave me problems. To install rubydev type:

    sudo apt-get install ruby1.8-dev

    To add the .gem directory to your path type in:

    vim ~/.bashrc

    At the end of the file type in:

    PATH=$PATH:/home/_username_/.gem/ruby/1.8/bin
    export PATH

    (Replace _username_ with your username)

    Now type in

    source ~/.bashrc

    This will add gem to your path. Now install heroku

    now install heroku by typing:

    sudo gem install heroku

    And you are done! Heroku is installed. You may want to install additional tools needed by heroku, documented as following.

  4. Installing git

    To install git on ubuntu type in the following commands. (Courtesy of zobie's blog)
    $ sudo apt-get build-dep git-core git-doc libssl-dev
    $ wget http://kernel.org/pub/software/scm/git/git-1.6.3.3.tar.gz
    $ tar -xzf git-1.6.3.3.tar.gz
    $ cd git-1.6.3.3/
    $ ./configure
    $ make all doc
    $ sudo make install install-doc
    $ git --version

  5. Installing curl

    If you plan to use any api's like that of Twitter, you may want to install curl, which comes in handy.

    To install curl, type in:

    sudo apt-get install curl

14 comments:

  1. i can't thank you enough for this. ive been pulling my hair out for hours as to why heroku wouldnt install. thank you!

    ReplyDelete
  2. great post.It was really helpful.Thank you very much!

    ReplyDelete
  3. Thanks!
    It just could take me hours without finding this post. short and clear.

    ReplyDelete
  4. thank you!! your article was very useful! ^__^

    ReplyDelete
  5. Anonymous4:56 PM

    Thanks so much. Fuckign path

    ReplyDelete
  6. Anonymous3:52 PM

    Thanks a bunch!!

    ReplyDelete
  7. Anonymous11:39 PM

    Thank you!

    ReplyDelete
  8. Most of this worked fine for me. I'm running Ubuntu 10.10 and I had to amend the instructions as follows:

    Instead of adding /home/MyUsername/.gem/ruby/1.8/bin to my path I instead added /var/lib/gems/1.8/bin

    I could not find a .gem folder in my home directory.

    ReplyDelete
  9. Oh you are so due a ferrari :) Thanks bud - been looking all night on a way to get this heroku business up and running ;) Hugs :) Biffer

    ReplyDelete
  10. Anonymous10:57 PM

    Could not figure out what was wrong with my u10.04 install, until I read your comment. Thanks Dominic, if you look outside you should see a Ferrari. (not yours, but you should see one :)

    ReplyDelete
  11. The tip for 10.04 is gold; also had to run:
    sudo apt-get install libopenssl-ruby

    before heroku would work properly.

    ReplyDelete
  12. Anonymous8:34 PM

    Thank you so much

    ReplyDelete
  13. Anonymous6:36 AM

    Thanq... but how to m getting error while running heroku. m under a proxy server. any help??

    ReplyDelete