This is what I get when I try to run anything like "sudo gem update
rails"
I tried to upgrade my 1.2.6 rails install running on Leopard. I think
the problem started because I forgot to run my "gem install rails"
command (to upgrade to 2.0) using "sudo". That and I forgot to use
"update" instead of "install" - so things are a bit crazy now.
I can run rails and the version in the Terminal is 2.0.1 - but when I
am getting a MySQL related error when I try to view the application's
framework. I thought I might need to update my gems, so I downloaded
the latest package and ran "ruby setup.rb". I also made sure that the
mysql gem was up to date. Now nothing related to gems is working.
I'm new to rails and I'm used to the whole "it just works" mentality
of developing on a Mac. So I really don't know where to begin when
I'm troubleshooting rails.
How do I make sure that my gems are properly installed and reinstall
them if I need to? And on that note, does anyone know where all the
gems are kept in Leopard? I found references to them in /Library/Ruby/
1.8/Gems and /System/Library/Frameworks/ruby.framework
Once I do that, is it possible to roll back to rails 1.2.6 so I can
get a stable environment again before trying to upgrade to 2.0 again?
Eureka! All I had to do was take the latest gems and run "sudo ruby
setup.rb" again. it copied over all the other gems (that I guess had
the wrong permissions) and now I can run "gem" scripts again. I'm
still having issues with the upgrade to 2.0 though, any ideas about
how I might be able to downgrade to 1.2.6, then try again?
Thanks, Jim. (BTW, it's "sudo gem update --system" with two
hyphens. But I got the idea, I just ran help to find the correct
syntax.
I was pretty sure that I already had 0.9, but I went ahead and updated
it then installed rails again. Still the same problem. After
creating a new rails project, I bring up localhost:3000 and check the
info about the application's environment and I get this:
Well I think I did the exact same thing... And then it dawned on me
that in creating that new rails app that I didn't go into mysql and
create any databases for it, so checking the app properties ran into a
problem:-) slapped my head, created a -development database and the
all was fine.