Tag Archives: ruby on rails


gedit plugins for Ruby on Rails

gedit is the default and one of the most popular text/code editor in GNOME based distro such as Ubuntu, Debian, Fedora, Linux Mint etc. It has a lot of cool plugins to add some extra features, some are installed by default while some are available there in package repository, to activate just go to the preferences section and enable it; You don’t even need to restart the gedit application.

gedit is a simple, efficient, easy to use and powerful text editor, it has lot of advanced features that makes it really good for programming (if you’re more hungry for features, then you should try Emacs, although Emacs is little hard to learn but the extra productivity you will gain is incomparable, good for long run). But these features are not enough for a rails developers, so there is a PPA dedicated for rails developers (although it’s for Ubuntu but works well with any debian based distro).

Gedit with GMate Plugin : on Ubuntu 12.04

GMate – The missing Gedit Plugins for Rails Developers

GMate is a set of cool plugins that will add some nice features to gedit text editor – in order to increase the fun with Rails Development (e.g by default gedit can’t highlight the ruby code in .erb.html files but gmate will do it for you!). Since gmate is a PPA for Ubuntu 11.10/12.04/older_versions so it will not work only on Ubuntu but also on other Debian derivatives. If you’re using Fedora or Archlinux then it won’t work, you may have to install it individually, see top 10 gedit plugins for the list of cool plugins.

Install GMate in Ubuntu

sudo apt-add-repository ppa:ubuntu-on-rails/ppa
sudo apt-get update
sudo apt-get install gedit-gmate

You can enable/disable the plugins from Edit -> Preferences -> Plugins.

Recommended Reading(s)

Gedit Shortcuts – Gedit Cheat Sheet for beginner developers, it also contains Gmate shortcuts!

Learning Rails ?

Check out this interactive video course on Ruby on Rails at Treehouse.

How to install Ruby on Rails in Ubuntu 11.10

Ubuntu (The latest stable version : 11.10(Oneiric Ocelot), released few weeks ago) is one of the most Linux based popular operating system and gradually becoming more popular among programmers and web developers. C/C++/Java programmers and web developers are rocking with the Ubuntu as it has a bunch of open source development tools available to increase the productivity at minimum or zero cost.

Ruby on Rails is one of the most popular framework for developing web applications using Agile approach. Rails (Latest version : 3.1) is based MVC (Model View Framework). Getting started with Rails has been little messy (On Linux platform) for beginners due to its installation/setup errors, probably due to some missing dependencies (e.g gems).Relax, it’s very simple, you just need to understand few basic things. This post has been written for those who want to get started with ‘Ruby On Rails'(commonly called as ROR) on Ubuntu 11.10 or the rails developers who want to develop cool application with Ubuntu 11.10.

To install ruby on rails in Ubuntu 11.10 (or other similar Linux distribution such as Linux Mint, Debian etc), just follow these simple steps. Although RVM is not strictly necessary but it’s strongly recommended – it will allow you to use multiple versions of Ruby, which may be be required in some cases.

step 1. Install dependencies

Install git : Git is the most popular (as well as fast and efficient; Linux kernel uses it; developed by Linux Torwalds, the same guy who developed Linux kernel) open source version control system. You can install it in one simple command to install it from the official package repository –

sudo apt-get install git

[You could also install git from the source (Download the source code, extract it and execute make && sudo make install) ]

Install Curl : Curl is a command line tool to get a file from FTP/HTTP/HTTPS server. To install, open terminal and execute the command –

sudo apt-get install curl

step 2. Install RVM (Ruby Version Manager)

Open terminal and execute the command (I assume you’ve already completed the step 1, otherwise first do that) –

bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

Now, you might have to edit the bashrc file to load RVM in shell session. To do that type –

gedit ~/.bashrc

and add the following line to the end (and save the file)
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Then reload the shell session using the command –

source ~/.bashrc

Now you can test whether the RVM has been installed successfully or not. Open terminal and execute the command –

type rvm | head -1

After executing above command you should be getting this output –
rvm is a function
That’s All.. You’ve successfully installed the RVM. Next, you are supposed to install few additional dependencies. To find out those programs type –

rvm requirements

After executing the above command, install the additional packages recommended by RVM –
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion

step 3. Install Ruby

Now, it’s time to install the ruby version you want (you’re recommended to use either 1.8.7 or 1.9.2). The generic syntax is rvm use version_name. It will also install the associated packages such as RubyGems and Bundler.

rvm install 1.9.2

Then select the version, you want to use –

rvm use 1.9.2

If you aren’t sure about the ruby version currently being used, then type –

ruby -v

step 4. install Rails

Finally, you can install the rails gem using a simple command –

gem install rails

That’s All.
Now, create a sample application (just for testing) using Ruby on Rails.

rails new my_app
cd my_app
bundle install
rails server

Then open your browser and type the following address (to see the application running) –

Learning Rails ?

Check out this interactive video course on Ruby on Rails at Treehouse.

Recommended Books/Tutorials for Beginners

Update 1. Fixed some typo in commands! and adds a link in resources!

Update 2. My Rails Application : Railyo – a private job board for rails developers/freelancers.

Set up ruby-on-rails

install Ruby on Rails in ubuntu 10.10/11.04


‘Ruby on Rails’  (ROR) is one of the most popular and productive open source framework that allows you to develop web applications very quickly with a lot of fun.

Ruby is a scripting language (like PHP) that focuses on ease of development and beautiful code. Ruby on Rails or simply ‘Rails’ is a web Apps development framework for Ruby programming language.

Rails is a cross-platform – web Apps development framework and this post will guide you in installing ‘Ruby on Rails’ framework on Ubuntu 11.04 (Natty Narwhal) or 10.10 (Maverick Meerkat) or 10.04 (Lucid Lynx) LTS..procedure is same for all versions. gedit text editor is enough for ruby programming – (usually better than heavy weight IDE’s), you can also customize gedit to look like TextMate (very popular (text editor) among ruby developers who uses Mac OS X).

Ruby version 1.8.7 is installed by default, in most of the Linux based operating system or distributions such as Ubuntu, so what you need to install is – ‘Rails’ , Gems (Gems are modular components or libraries very similar to Package in java), git (git is one of the best – free and open source version control system (developed by Linus Torwalds), it is not strictly necessary but recommended) and curl. Before you move on for installing ROR, Apache (Not necessary because ROR ships with WEBrick, the default HTTP server for rails apps) and MySQL or SQLite should be installed.

Installing Ruby on Rails in Ubuntu

#1 : Install git (not necessary but recommended), the version control system.

sudo apt-get install git

or install from source – Download git (Latest Version : Then extract the archive and move to the extracted directory and type the following command(s) to install it –

make && sudo make install

#2 : Install Curl (Command Tool for transferring data with URL Syntax).

Download it (Latest version : 7.21.7) and install in the similar way as you installed git (in step 1, using source)

#3 : Install  Ruby Version Manager (RVM), a command line tool which allows you to run multiple versions of ruby – such as 1.8.7 as well as 1.9.2. Gem will be installed along with this, if not, then install rubygems before proceeding to next step.

bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

Then type the command given below, to check whether it has been correctly installed, the output after executing the command will be – ‘rvm is a function’

type rvm | head -1

#4 : Install Ruby 1.9.2 (1.8.7 is installed by default)

rvm install 1.9.2
rvm use 1.9.2

#5 : Install Rails

gem install rails

#6 : Install SQLite3 (Not necessary if you want to use MySQL but ROR uses SQLite database by default, so you need to install ruby and sqlite related packages and ORM libraries).

gem install sqlite3

That’s All..now you are ready to rock with ‘Ruby on Rails’. Create new Application using simple command and start the server.

rails new apps_name
cd apps_name
rails server

Now open your browser and type the following address in the address bar –

Learning Rails ?

Check out this interactive video course on Ruby on Rails at Treehouse.

Update! Checkout my rails application: Railyo – job board for rails Freelancers!