HOWTO: install Ruby on Rails on Debian or Ubuntu Linux easily

In the early days of this blog I used to run it on Typo, which was a great Ruby on Rails blogging platform (at one time).  Unfortunately the project stalled (for years) and I ended up jumping ship after a few months of bugs and the ever crashing Rails server, WEBrick.  Yes, if you search Netcraft you could see that was my exposed server at the time…not good! ;)  Now if you look, Typo is still kicking, and it may be a solid platform now, I hope it is, as I even contributed a ton of the achieved themes that live on in the ‘Theme Garden’ there.  But on I moved into the world of MySQL/PHP front end sites via great apps like Drupal and Wordpress, fast forward, Ruby on Rails is a mature platform now, and I am evaluating webapps at work, so I needed to install Rails on Debian GNU/Linux (but of course these directions would work just as well in Ubuntu Linux.  It’s amazing simple, I took some steps from the Ruby on Rails wiki, first install the dependencies for good measure:

apt-get -y install ruby irb ri rdoc ruby1.8-dev build-essential

Then install rubygems and rails:

apt-get -y install rubygems rails

Yep, that was easy. Now create your first rails app to ensure things are working as they should be:

rails newrailsapp cd newrailsapp script/server

Then hit your server to see it live, hit it in your browser: Or, if you’re like me, you’re running it on a remote server, have it bind WEBrick to the IP that you use to access it, so in my case I quit out of WEBrick, and restarted it with:

script/server --binding=

And then hit it via Nice, so much easier than I remember it being. While I’m posting here, I’ll drop a few more links I want to follow, as if I use RoR on upcoming projects I’ll need to investigate as we scale to the clouds!

CouchDB with Rails

REST on Rails