I have been learning Ror, and developing my first application. I
unfortunately am also relatively new to the mac, so please forgive my
ignorance if I did something blatantly ridiculous.
I have been using rails 2.2.2. I learned about
accepts_nested_attributes_for this morning, and realized I had to
update my version of rails.
I first performed a gem update. I cant recall the exact command I
invoked at this particular moment, but I believe it was rake
rails:update. There was an installation warning, and the installer
commented that it was installed in the following directory:
Being totally stupid, I figured - heck, this isnt goign to work, so I
inserted the above into my $PATH in .profile. I actually thought the
rake rails:update would have updated my version of rails (I was in a
working directory when I did this)
I then issued the following command: gem install -v=2.3.5 rails
I received the following error message after the install:
WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and
/usr/bin aren't both writable.
Successfully installed rails-2.3.5
1 gem installed
Installing ri documentation for rails-2.3.5...
Installing RDoc documentation for rails-2.3.5...
/users/triguy_nc/work/j4m1> ruby script/server
RubyGem version error: rack(1.0.0 not ~> 1.0.1) (Gem::LoadError)
from /Library/Ruby/Site/1.8/rubygems.rb:261:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:68:in `gem'
When I issue $PATH at teh command prompt, I receive the following
usr/X11/bin: No such file or directory
So, I am basically hosed, but do think I can revert to 2.2.2 in my
environment.rb. BUT, I really need to learn some basics of what I am
trying to do.
1. Can someone give me some guidance to undo my errors above, and
repair my system so the installation is proper?
2. Can you also point me to a tutorial to help me to understand the
method to update rails, so I dont make the same hack mistakes again.