| Saturday November 22nd 2014

Feedburner

Subscribe by email:

We promise not to spam/sell you.


Search Amazon deals:

HOWTO: Install Ruby on Rails on Debian


Ruby on RailsInstalling Rails on Debian or Ubuntu is quite simple. To ensure that you have a Rails-compatible version of Ruby installed, do not install the old (and possibly broken) version of Ruby with apt-get/aptitude. Rather, install Rubygems and have it fetch Ruby for you. Again… Do not install rails using apt-get/aptitude! The debian repository includes a very old and broken version.

From the command line, run:

aptitude update && aptitude upgrade

This will make sure you have everything up to date.


Then, run

aptitude install rubygems build-essential

This will install RubyGems, the ruby package manager, and pull in ruby if you don’t have it installed already. The build-essential package contains all the native build tools for your system (gcc, dev libs, etc.). Build-essential isn’t required for Rails itself, but assuming you’ll ever want to install a gem with native extensions (like mongrel), you’ll need it.

Don’t forget to export the path via /etc/bash.bashrc (e.g.: export PATH=$PATH:/var/lib/gems/1.8/bin)

Lastly, we’ll install rails itself:

gem install rails --include-dependencies

You’re done. Now you may create (mkdir /var/rails) and chown (chown -R www-data:www-data /var/rails) your rails directory. Next, type su -m www-data and then rails testapplication to create your first r.o.r. webapp.

Related Posts: On this day...

Reader Feedback

One Response to “HOWTO: Install Ruby on Rails on Debian”

  1. Chung Shaer says:

    I thought it was likely to be some dull outdated publish, however it paid out regarding time. I’ll publish a hyperlink to this web page on my blog. I know my personal visitors will see in which very beneficial. . . .

Leave a Reply

You must be logged in to post a comment.