Meditation, Mountains and Machine Learning.
Ruby On Rails… in the beginning
So I’m finally learning Ruby on Rails (RoR). I’m using the wonderful Ruby On Rails Tutorial book by Michale Hartl. Which is available for free online or you can buy a print version. He also offers screencasts and a DRM-free pdf version, so there’s lots to choose from.
The book is written really well, very easy to follow along. However I have had some problems arise and that’s the reason for this post.
The book walks you through using Git, Github and Heroku. Unfortunately for me things didn’t run smoothly with using Heroku what follows are solutions for how my problems were fixed.
The first was when I tried the command:
$ heroku keys:add
which gave me the following error:
`rescue in <top (required)>': no such file to load -- net/https. Try running apt-get install libopenssl-ruby (LoadError)
My savior came in the form of some dude called Sathya who suggested that a solution noted on the OSDIR mailing list would do the trick. He was right.
The following code got me back on track (though the recompiling takes a while):
$ rvm remove 1.9.2
$ rvm package install openssl
$ rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm/usr
Unfortunately it also lead me straight to another error:
`require': no such file to load -- readline (LoadError)
This time my savior came in the form of a guy called Stefan Siebel who’s website has a great post dealing with this exact error. The solution:
$ sudo apt-get install libreadline-dev
$ cd ~/.rvm/src/ruby-<your ruby version>/ext/readline
$ ruby extconf.rb
$ make
$ make install
And SHAZAM! Heroku now works.
Kudos to Sathya and Stefan for posting the solutions so I could find them.
| Print article | This entry was posted by RSJ on January 11, 2011 at 11:28 pm, and is filed under Programming. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
about 2 years ago
Great to hear that my post was helpful
about 2 years ago
Wow, strange. I don’t think I had any of those problems setting up Heroku on Ubuntu! And I’ve never even heard of rvm before
Good times.