I am a developer, NOT a sysadmin!  Now that this is out of the way, I also should mention that I’m a newb when it comes to Linux and for that matter Ruby on Rails (compared to most Rails and Linux users).

I was initially intrigued by Ruby on Rails from an entrepreneur standpoint; you can create a data driven website literally within minutes.  However, one thing that I learned really quickly was that although Rails development allows for rapid prototyping/development, the install, on the other hand is a major pain in the butt.

One of the major lessons learned is that version matching between Ruby, Ruby Gems, and Rails is paramount in a successful Rails 3.0 install.  Another lesson learned is that install steps for Windows, Linux, and Apple can be drastically different; some have parts already installed and others don’t (among many other differences).  The steps below are strictly for installing Ruby on Rails 3.0 on Ubuntu 10.04.  There are no guarantees for other operating systems, and for that matter, if you deviate from the versions used below, there is no guarantee the install will work.

<rant>Sorry to be such a stickler about versions and operating system differences, but I have tried minor deviations from the below and spent endless hours, just to figure out it was a version of one thing not compatible with another thing.</rant>

Alright, enough talk... on to the install.

First we have to install Ruby 1.8 and necessary components
sudo apt-get install ruby1.8-dev libopenssl-ruby1.8 libsqlite3-dev


Next we will create a symbolic link so we can use "ruby" in place of "ruby1.8"
sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby


Then we will install Ruby Gems 1.3.6
cd ~
wget http://rubyforge.org/frs/download.php/69365/rubygems-1.3.6.tgz
tar -xvf rubygems-1.3.6.tgz
cd rubygems-1.3.6
sudo ruby setup.rb


We will also create a symbolic link for "gem" as well
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem


Next we will install Rails 3.0
sudo gem install rails --version 3.0.0 --verbose --no-rdoc --no-ri


Now we can create a data driven website with Rails 3.0
cd ~
rails new testing
cd testing
sudo bundle install
ruby script/rails server


Go to http://localhost:3000 in your browser to check it out.

Good luck and let me know what you think.

-Jessy Houle

Posted in:   Tags:

 

blog comments powered by Disqus
Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012 It Works On My Box