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;
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