Debian + Ruby + Gem + Rails + Mongrel = RubyOnRails

After much frustration, I think I finally have a working installation recipe for RubyOnRails on Debian Linux.

  1. Install Debian
  2. Install ssh and sudo
  3. apt-get install ssh sudo

  4. Remove “root” login from ssh config file
  5. Create a “source” directory
  6. cd /
    mkdir source

  7. Install tools for compiling from various sources
  8. apt-get install gcc gcc-3.4-doc gcc-3.4 g++-3.4 make libc6-dev flex openssl curl wget zlib1g-dev libzlib-ruby

  9. Download latest Ruby (1.8.5 as of this entry), unpack and install
  10. cd /source
    wget http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.5-p2.tar.gz
    tar xzvf ruby-1.8.5-p2.tar.gz
    cd ruby-1.8.5
    ./configure
    make
    make install
    cd ..

  11. Download, unpack, compile and install zlib (not included in testing version of Ruby?)
  12. wget http://www.blue.sky.or.jp/atelier/ruby/ruby-zlib-0.6.0.tar.gz
    tar xzvf ruby-zlib-0.6.0.tar.gz
    cd ruby-zlib-0.6.0
    ruby extconf.rb
    make
    make install
    cd ..

  13. Download, unpack, compile and install Ruby Gems (0.9.2 as of this entry)
  14. cd /source/
    wget http://rubyforge.org/frs/download.php/17190/rubygems-0.9.2.tgz
    tar xzvf rubygems-0.9.2.tgz
    cd rubygems-0.9.2
    ruby setup.rb

  15. Install Rails
  16. gem install rails --include-dependencies

  17. Install Mongrel
  18. gem install mongrel mongrel_cluster --include-dependencies

  19. Create a dummy application
  20. cd ~/
    rails test
    mongrel_rails start

  21. Go to http://your.ip.address:3000/ to see if it works
  22. Sources

Leave a Reply