Meditation, Mountains and Machine Learning.
Programming
Autotest Notification for Ubuntu
Jan 12th
Continuing on from my last post. Not an error this time, just linux specific instructions not given in Michael Hartl’s Ruby on Rails Tutorial.
So to use Autotest you need the following commands:
$ sudo apt-get install libnotify-bin
$ gem install autotest-notification
$ an-install
Done. If you would like to change the icons used they can be found at:
~/.rvm/gems/ruby-<your rails version>@<your project>/gems/autotest-notification-2.2.1/images
For example:
~/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/autotest-notification-2.2.1/images
Thanks to Fred Schoeneman for the handy hints on his blog.
Ruby On Rails… in the beginning
Jan 11th
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.