Ruby & Gem installation

If you really do not want to suffer from installation process of ruby and rubygems please install

sudo apt-get install build-essential libyaml-dev zlib1g-dev libssl-dev libreadline5-dev

And probably you gonna want install libsqlite3-dev or libpg-dev for postgresql packet too if you wanna install rails using gem.

We assume you are using Ubuntu Linux 64 bit so;
wget http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise_1.8.7-2011.12_amd64_ubuntu10.04.deb
sudo dpkg -i ruby-enterprise_1.8.7-2011.12_amd64_ubuntu10.04.deb
then you can install additional files like rails.

By the way if you are building it by yourself and you already downloaded the source from ruby’s offical site please do not forget to check if it comes with “gem” already. You probably can’t install another gem version other than that.

if you switched to new versions of ruby(1.9.2 and higher) and rails you may have trouble with yaml parser. New ruby uses psych, not syck. To downgrade it at use time with the rails project basicly edit /config/boot.rb file and add following lines;

require 'yaml'
YAML::ENGINE.yamler= 'syck'

And finally if you want to make it work in production mode without any modification and default server, you better modify the config/environments/production.rb as below;

config.serve_static_assets = true
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s