27 June 2012

Installing Ruby 1.9.3 In Ubuntu 12.04

Do note that the ruby1.9.1 package is for Ruby 1.9.3 (with Ubuntu 12.04). The version number at the end of the package name is for the ABI version of Ruby (1.9.1) that the package covers.

  1. Install ruby1.9.1 package for the Ruby language (also installs the libruby1.9.1 package that contains the standard Ruby library)
  2. Install ruby1.9.1-dev package in order to install gems that use native extensions

11 June 2012

Installing Rails 3.2.3 In Ubuntu 10.04

Ruby needs to be installed before installing Rails. It is highly recommended that Ruby 1.9.2 or greater is used.

  1. Install Rails as a Ruby Gem – gem install rails -v 3.2.3
  2. Add the following PPA as a package repository – ppa:chris-lea/node.js
  3. Install the required python-software-properties package
  4. Update the package manager
  5. Install the nodejs package
  6. Install sqlite3 package
  7. Install libsqlite3-dev package
  8. Install the sqlite3 gem – gem install sqlite3 -v 1.3.5


Notes


It is highly recommended that the Rails documentation is generated in order to have an offline Rails API reference. Do the following to create the API reference:

  1. In your home directory run this command – rails new sample_app
  2. Navigate to the newly created directory
  3. Run the following command to generate the documentation – rake doc:rails
  4. Move the generated documentation from doc/api to your Documents directory
  5. Rename the moved documentation directory to rails-3.2.3-api-doc
  6. In the rails-3.2.3-api-doc directory create a shortcut to index.html on your desktop, or view index.html in the web browser and bookmark it