Ruby on Rails with Linux Mint Debian Edition
These procedures are based on the September 2011 release of Linux Mint Debian Edition (LMDE) with the GNOME desktop environment.
Advantages of LMDE over Ubuntu
-
LMDE includes some of the necessary packages that Ubuntu and its derivatives lack.
-
LMDE is faster, lighter, smoother, more refined, and more user-friendly than Ubuntu. LMDE replicates the look and feel of Linux Mint's traditional Ubuntu-based editions while bypassing the heavy Ubuntu overhead. This makes LMDE faster than its Ubuntu-based counterparts.
-
Many people (including myself) don't like the recent changes in Ubuntu. I've tried both Ubuntu 11.04 and Xubuntu 11.04, and I didn't like working with them.
Advantages of GNOME over Xfce
-
Linux Mint has always used GNOME in its main editions. Because the developers use GNOME more than any other desktop environment, the GNOME editions are probably better developed and debugged.
-
The Xfce editions has Thunar 1.2.2 for its file manager. Thunar 1.2.2 has an annoying lag issue. The first time you open a Thunar window after booting up, Thunar freezes, and you have to wait a moment for it to operate normally. The GNOME edition of LMDE doesn't have Thunar and thus avoids this problem.
-
In theory, LMDE with GNOME should be slower than LMDE with Xfce. In practice, I haven't noticed any difference even at 512 MB of RAM.
Procedure
-
Install Linux Mint Debian Edition in VirtualBox.
-
Use the Reload button in Synaptic or the "sudo apt-get update" command to update the software repository.
-
Use Synaptic or Apt-Get to install Git. (The package is git.)
-
Ruby is included with LMDE, but RubyGems and Rails are not. You need to use Apt-Get or Synaptic to install packages.
- Some of the necessary packages are included with LMDE but not Ubuntu or Ubuntu-based distros. If you are using Ubuntu or a Ubuntu-based distro, you will need to add these packages: build-essential libruby ruby
- If you need Ruby 1.8.7, install the following packages: libfcgi-dev rubygems ruby1.8-dev sqlite3 libsqlite3-dev libxslt1-dev
- If you need Ruby 1.9.2 instead of Ruby 1.8.7, you need the following packages: libfcgi-dev ruby1.9.1 libruby1.9.1 ruby1.9.1-dev sqlite3 libsqlite3-dev libxslt1-dev
You also need to remove the following packages: ruby ruby1.8 libruby1.8 ruby
Note that RubyGems is included with Ruby 1.9.2.
-
In the command line, enter "ruby -v" to see what version of Ruby you have installed.
-
Enter "gem -v" to see what version of RubyGems you have installed.
-
To switch from the default version of RubyGems to a different version, install it from source. (This isn't the only way, but it works best for me.) Go to http://rubyforge.org, search for RubyGems, and download rubygems-(version number).tgz it into your /home/(username)/Downloads directory. Open a terminal window and enter each of the following commands to install:
cd Downloads
tar xzf rubygems-(version number).tgz
cd rubygems-(version number)
sudo ruby setup.rb
-
Enter "gem -v" to see what version of RubyGems is installed to verify that you have the desired version.
-
To install Rails and the SQLite3 database, enter the following commands:
sudo gem install rails
sudo gem install sqlite3
-
To see what version of Rails is activated, enter the command "rails -v".
-
To list what versions of Rails are installed, enter the command "gem list --local rails".
-
To install another version of Rails, enter "sudo gem install rails --version (version #)".
-
To uninstall a version of Rails, enter "sudo gem uninstall rails --version (version #)".