Ruby on Rails on Ubuntu 11.04

Ruby on Rails

Ruby on Rails

Ruby on Rails, often shortened to Rails or RoR, is an open source web application framework for the Ruby programming language.


Yeah with the tracks and all. Funny it looks more like Reel than Rail ūüėõ

Okay anyway. You wouldn’t believe but this very post is dedicated to ‘appreciate’ the framework.

Setting up:


Use Synaptic


$ sudo apt-get install ruby1.9.1 ruby1.9.1-full nodejs sqlite3 libsqlite3-dev


Download RubyGems from

Unzip. Use terminal and navigate to the unzipped content.


$ sudo ruby1.9.1 setup.rb

Output: RubyGems installed the following executables: /usr/bin/gem1.9.1


$ sudo gem1.9.1 install rails

Output: 30 gems installed


$ rails new path/to/your/new/application

Output: Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

$ cd path/to/your/new/application

$ rails server


=> Booting WEBrick
=> Ctrl-C to shutdown server
[2011-10-08 23:02:20] INFO  WEBrick 1.3.1
[2011-10-08 23:02:20] INFO  ruby 1.9.2 (2010-08-18) [x86_64-linux]
[2011-10-08 23:02:20] INFO  WEBrick::HTTPServer#start: pid=4967 port=3000

Open Firefox: http://localhost:3000/

Welcome Onboard

Ruby on Rails Running ...

Now its time to (Sleep?) customize the application. Good Bye!

Do Visit:




Issues Faced:



$ ruby
The program ‘ruby’ is currently not installed.¬† You can install it by typing:
sudo apt-get install ruby
Resolution: use ruby1.9.1 instead

$ ruby1.9.1 setup.rb
ERROR:¬† While executing gem … (Errno::EACCES)
Permission denied – /usr/local/lib/site_ruby/1.9.1/ubygems.rb
Resolution: $ sudo ruby1.9.1 setup.rb
(superuser required. ergo sudo user provided)


$ gem1.9.1 install rails
Fetching: multi_json-1.0.3.gem (100%)
ERROR:¬† While executing gem … (Errno::EACCES)
Permission denied – /usr/lib/ruby/gems/1.9.1
Resolution: $ sudo gem1.9.1 install rails
(superuser required. ergo sudo user provided)



ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb checking for sqlite3.h... no sqlite3.h is missing.
Try 'port install sqlite3 +universal' or 'yum install sqlite3-devel' *** extconf.rb failed ***

Resolution: $ sudo apt-get install libsqlite3-dev


$ sudo rails server
/usr/lib/ruby/gems/1.9.1/gems/execjs-1.2.9/lib/execjs/runtimes.rb:47:in `autodetect’: Could not find a JavaScript runtime. See for a list of available runtimes. (ExecJS::RuntimeUnavailable)
from /usr/lib/ruby/gems/1.9.1/gems/execjs-1.2.9/lib/execjs.rb:5:in `<module:ExecJS>’
Resolution: $ sudo apt-get install nodejs
(V8 by Google)