How to Install Ruby on a Shared Web Host
by Chubs

Create a directory for all of the software you are going to download and installed. In this example, the created directory is “temp” at the root of the files system, but you can use any name and location you like.
cd /
mkdir temp
chmod 775 temp
Now, download, configure and install Ruby. You can download the latest stable source tarball for Ruby here. Wget is used in this example:
cd temp
wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.2.tar.gz
tar -zxvf ruby-1.8.2.tar.gz cd ruby-1.8.2
Specify an install directory since there are times when you won’t have permissions to install things in normal directories. Here, we can see the “configure” script for Ruby, creating a directory inside “/usr/local” for installation:
./configure –prefix=/usr/local/ruby –exec-prefix=/usr/local/ruby
Now, you have a Makefile that you can compile:
make
make install
Your Ruby is now installed. You should try making a symbolic link to Ruby somewhere in your local path:
ln -s /usr/local/ruby/bin/ruby /usr/local/bin/ruby
How to Install RubyGems and Rails on a Shared Web Host
by Chubs

RubyGems or Gem allows you to install extra packages and libraries for Ruby. You need Gem before installing Rails. You can get the latest version of RubyGems here.
cd /temp
wget http://rubyforge.org/frs/download.php/3700/rubygems-0.8.10.tgz
tar -zxvf rubygems-0.8.10.tgz
cd rubygems-0.8.10
To install RubyGems, you need to use Ruby to call the setup script:
ruby setup.rb
Here, you should see “Successfully built RubyGem” if it’s finished. Next, open the file “/usr/local/ruby/bin/gem” in your favorite text editor (such as vi) and edit the first line so you’ll know where to find your custom Ruby installation. Example:
#!/usr/local/bin/ruby
Now, add a few more symlinks:
cd /usr/local/bin
ln -s /usr/local/ruby/bin/erb erb
ln -s /usr/local/ruby/bin/eruby eruby
ln -s /usr/local/ruby/bin/gem gem
ln -s /usr/local/ruby/bin/gem_server gem_server
ln -s /usr/local/ruby/bin/testrb testrb
ln -s /usr/local/ruby/bin/update_rubygems update_rubygems
RubyGems is now installed. To install Rails, use:
gem install rails –remote
Necessity for a Hash Key

Image Source: www.cheat-sheets.org
The only restriction for a hash key is that it must reply to the message hash with a hash value, and the hash value for a given key must not alter. This means that certain classes (such as Array and Hash, as of this writing) can’t conveniently be used as keys, because their hash values can change based on their contents.
If you keep an external reference to an object that is used as a key, and use that reference to alter the object and change its hash value, the hash lookup based on that key may not work.
Because strings are the most frequently used keys, and because string contents are often altered, Ruby treats string keys specially. If you use a String object as a hash key, the hash will replace the string internally and will use that duplicate as its key. Any changes afterward made to the original string will not influence the hash.
If you write your own classes and use instances of them as hash keys, you need to make sure that either (a) the hashes of the key objects don’t change once the objects have been created or (b) you bear in mind to call the Hash#rehash method to reindex the hash whenever a key hash is altered.
List of Rails Web Hosts

Here is a list of web hosting services which support Ruby on Rails in case you might be looking for one for your website:
America:
• A2 Hosting
• AVLUX
• BILES ONLINE Ruby on Rails Hosting
• BlueHost
• Crucial Paradigm
• Dedicated Hosting
• Domain Gurus
• Hosting Rails
• JaguarPc
• SpeedyRails
• Zowes Web Hosting
Asia:
• Exaltinfo
• GVT.hk
• RailsFactory
• Web Development India
• Web Hosting Delhi
Australia:
• Anchor Systems
• Avial Web Design and Hosting
• Crucial Australia
• Hostcentral
Europe:
• 600host.net
• Blacknight Solutions
• Brightbox
• GPcom Media
• Media72 Hosting
For the complete list of Rails web hosts, visit: http://wiki.rubyonrails.org/rails/pages/RailsWebHosts