• RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

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 so far.

  1. [...] 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) Read it here [...]

  2. Prasinos says:

    Why not install rubygems and rails using apt-get?

  3. Akhil Bansal says:

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

  4. Amit Solanki says:

    Thanks. Your blog again saved my time.

  5. Excellent post!!! Very, very helpful.


Asset Pipeline has been extracted a...

The asset pipeline which was introduced in Rails 3.1, has ...

ClientSideValidations: Add/Map mode...

https://twitter.com/bansalakhil/status/256699237230845952

Action and Page caching has been ex...

With the commit c82cf81f00f Action and Page caching has been extracted ...

turbo-sprockets-rails3: Speeds up ...

http://twitter.com/bansalakhil/status/253420357841723393

EdgeRails: ActiveRecord::SessionSto...

With the commit 3324e28804 ActiveRecord::SessionStore is extracted out of Rails into ...

Asset Pipeline has been extracted a...

The asset pipeline which was introduced in Rails 3.1, has ...

ClientSideValidations: Add/Map mode...

https://twitter.com/bansalakhil/status/256699237230845952

Action and Page caching has been ex...

With the commit c82cf81f00f Action and Page caching has been extracted ...

turbo-sprockets-rails3: Speeds up ...

http://twitter.com/bansalakhil/status/253420357841723393

EdgeRails: ActiveRecord::SessionSto...

With the commit 3324e28804 ActiveRecord::SessionStore is extracted out of Rails into ...