Hassle free installation of rails stack on debian based system

Published on Author Akhil Bansal5 Comments

Want to install rails stack on a machine? Just follow these steps. It will setup a rails stack(Apache + passenger + mysql + ruby + rubygems + common gems + git) on any server(debian based)

  1. apt-get update
  2. apt-get upgrade -y
  3. apt-get -y install build-essential libssl-dev libreadline5-dev zlib1g-dev
  4. apt-get -y install mysql-server libmysqlclient15-dev mysql-client
  5. apt-get -y install ruby ruby1.8-dev irb ri rdoc libopenssl-ruby1.8
  6. install rubygems manually:
    1. download rubygems form rubyforge, >=1.3
    2. unzip files
    3. ruby setup.rb
    4. Check that gem command is in path. Sometimes ‘gem1.8’ is available but ‘gem’ not. In that case copy /usr/bin/gem1.8 to /usr/bin/gem using “cp /usr/bin/gem1.8 /usr/bin/gem”
  7. apt-get -y install libmagick9-dev
  8. apt-get -y install imagemagick
  9. apt-get -y install postfix mailx
  10. apt-get -y install apache2
  11. apt-get -y install apache2-prefork-dev
  12. wget http://webonrails.com/wp-content/plugins/download-monitor/download.php?id=7
  13. ruby install_gems.txt
  14. passenger-install-apache2-module
  15. Download git from git-scm.com

    1. Unzip files
    2. ./configure –without-tcltk
    3. make -j 2
    4. make install

You are all set now, go deploy you rails app. I have tested it on linode(ubuntu8.10), slicehost(ubuntu 8.10), should work for you too

5 Responses to Hassle free installation of rails stack on debian based system

  1. If you install rails and rubygems using apt-get. You might not get latest/desired version of rails and rubygems

Leave a Reply

Your email address will not be published. Required fields are marked *