gem install rails - errors MAC OSX (snow leopard)

This produced quite a mouthful of text.
I'm stuck on the error messages and wondering if I messed something
up. Any advice would be very appreciated. Thank you.

dust:~ Lex$ gem install rails
WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and
/usr/bin aren't both writable.
WARNING: You don't have /Users/Lex/.gem/ruby/1.8/bin in your PATH,
gem executables will not run.
Successfully installed activesupport-2.3.4
Successfully installed activerecord-2.3.4
Successfully installed rack-1.0.1
Successfully installed actionpack-2.3.4
Successfully installed actionmailer-2.3.4
Successfully installed activeresource-2.3.4
Successfully installed rails-2.3.4
7 gems installed
Installing ri documentation for activesupport-2.3.4...
Installing ri documentation for activerecord-2.3.4...
Installing ri documentation for rack-1.0.1...
Installing ri documentation for actionpack-2.3.4...
Installing ri documentation for actionmailer-2.3.4...
Installing ri documentation for activeresource-2.3.4...
Installing RDoc documentation for activesupport-2.3.4...
Installing RDoc documentation for activerecord-2.3.4...
Installing RDoc documentation for rack-1.0.1...
Installing RDoc documentation for actionpack-2.3.4...
Installing RDoc documentation for actionmailer-2.3.4...
Installing RDoc documentation for activeresource-2.3.4...

dust:~ Lex$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
dust:~ Lex$ PATH=$PATH\://Users/Lex/.gem/ruby/1.8/bin
dust:~ Lex$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin://Users/
Lex/.gem/ruby/1.8/bin

dust:~ Lex$ gem install rails
WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and
/usr/bin aren't both writable.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/rubygems/installer.rb:144: warning: Insecure world writable dir //
Users/Lex in PATH, mode 040733
WARNING: You don't have /Users/Lex/.gem/ruby/1.8/bin in your PATH,
gem executables will not run.
Successfully installed rails-2.3.4
1 gem installed
dust:~ Lex$

This produced quite a mouthful of text.

I’m stuck on the error messages and wondering if I messed something

up. Any advice would be very appreciated. Thank you.

dust:~ Lex$ gem install rails

WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and

/usr/bin aren’t both writable.

WARNING: You don’t have /Users/Lex/.gem/ruby/1.8/bin in your PATH,

gem executables will not run.

Successfully installed activesupport-2.3.4

Successfully installed activerecord-2.3.4

Successfully installed rack-1.0.1

Successfully installed actionpack-2.3.4

Successfully installed actionmailer-2.3.4

Successfully installed activeresource-2.3.4

Successfully installed rails-2.3.4

7 gems installed

Installing ri documentation for activesupport-2.3.4…

Installing ri documentation for activerecord-2.3.4…

Installing ri documentation for rack-1.0.1…

Installing ri documentation for actionpack-2.3.4…

Installing ri documentation for actionmailer-2.3.4…

Installing ri documentation for activeresource-2.3.4…

Installing RDoc documentation for activesupport-2.3.4…

Installing RDoc documentation for activerecord-2.3.4…

Installing RDoc documentation for rack-1.0.1…

Installing RDoc documentation for actionpack-2.3.4…

Installing RDoc documentation for actionmailer-2.3.4…

Installing RDoc documentation for activeresource-2.3.4…

dust:~ Lex$ echo $PATH

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

dust:~ Lex$ PATH=$PATH://Users/Lex/.gem/ruby/1.8/bin

dust:~ Lex$ echo $PATH

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin://Users/

Lex/.gem/ruby/1.8/bin

dust:~ Lex$ gem install rails

WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and

/usr/bin aren’t both writable.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/

1.8/rubygems/installer.rb:144: warning: Insecure world writable dir //

Users/Lex in PATH, mode 040733

WARNING: You don’t have /Users/Lex/.gem/ruby/1.8/bin in your PATH,

gem executables will not run.

Successfully installed rails-2.3.4

1 gem installed

dust:~ Lex$

Alex, please try to doing the following:

sudo gem install rails

Good luck,

-Conrad

This produced quite a mouthful of text.
I'm stuck on the error messages and wondering if I messed something
up. Any advice would be very appreciated. Thank you.

Further to Conrad's advice, these aren't actually errors - just gem
being a little oververbose. What it is saying is that it couldn't
install gems in the system owned gem directories, because they aren't
writable by you, so instead it has installed them in the .gem folder
in your home folder. It is also warning you that because of this, just
running
rails

won't work - you'd have to type ~/.gem/ruby/1.8/bin/rails

instead. Other than that there's nothing wrong.

Fred

thank you both.
i did the sudo install...
and also did navigate to the ~/.gem/ruby ... folders and saw that it
is in both now.