/ Documentation / Rails application server under Debian

Rails application server under Debian

Here we will briefly overview the installation procedure of server-side Rails application server installation.


We will use latest Debian Squeeze GNU/Linux distribution with “Standard package collection” installed.

Also the following packages are required:

  • build-essential
  • libssl-dev
  • ruby1.8-dev
  • mysql-server
  • libmysql++-dev
  • gnuplot

Ruby environment installation

Very well tested Ruby’s version interpreter can be found there: http://ftp.ruby-lang.org/pub/ruby/ruby-1.8.6-p420.tar.bz2. Just download it, uncompress, compile and install.

Different gems will be required too. Let’s use also well tested RubyGems library that can be found there: http://production.cf.rubygems.org/rubygems/rubygems-1.3.4.tgz. Download, uncompress it and run: ruby setup.rb.

Here is the exact gems required with corresponding versions:
gem install --verbose --version=0.9.2 rake
gem install --verbose --version=0.0.1 sources
gem install --verbose --version=2.1.2 builder
gem install --verbose --version=1.1.4 daemons
gem install --verbose --version=0.2.3 gem_plugin
gem install --verbose --version=2.5.0 cgi_multipart_eof_fix
gem install --verbose --version=1.0.1 fastthread
gem install --verbose --version=2.7 mysql
gem install --verbose --version=1.1.4 mongrel
gem install --verbose --version=1.0.5 mongrel_cluster
gem install --verbose --version=2.0.2 activerecord
gem install --verbose --version=2.0.2 activeresource
gem install --verbose --version=2.0.2 actionpack
gem install --verbose --version=2.0.2 actionmailer
gem install --verbose --version=2.0.2 rails

Optionally, if you use LDAP authentication, then the following packages are required:

  • libldap2-dev
  • libsasl2-dev

And an additional gem needs to be installed:

gem install --verbose ruby-ldap

Database creation

After all their successful installation, you can create “inq” database and grant permissions for “inq” user:
GRANT ALL ON inq.* TO inq@localhost IDENTIFIED BY 'inq';
  • Edit config/database.yml and point it to newly created database
  • Upload database scheme: rake db:schema:load
  • Perform all database migrations: rake db:migrate