Install ing rails

Hi all,
I’m having trouble installing rails onto my machine .
i have a Solaris 10 x86 box, ruby version 1.8.6 gem version 1.2.0.
when I try to install rails using gems with the command line:
gem install rails

It throws this:
root# gem install rails
ERROR: While executing gem … (Errno::ENOENT)
No such file or directory - /usr/local=

has any one got any ideas why its throwing this error?

Dan.