Rails comes preinstalled on Leopard, but the preinstalled version is
1.2.3. However, RubyGems is also preinstalled, and you can use gem to
upgrade to rails 2.
gem update --system (updates RubyGems itself)
gem update (updates all your gems, including rails)
rails 2 depends on a new gem, activeresource, that rails 1.2 didn't, so:
gem install activeresource
You can find your gems in /usr/lib/ruby/user-gems/ (which is actually
a symlink to /Library/Ruby/Gems)
As far as rails is concerned updating the preinstalled gems is more or
less what I did on my mac mini, which I did a clean Leopard install
on. On my macbook, I upgraded from Tiger, where I had the rails stack
set up according to the guide at hivelogic.
After the upgrade to Leopard, mysql wasn't working, so I built it from
source, following this guide:
I haven't checked if mysql released a leopard installer since.
Oh and BTW those steps are to upgrade the existing Ruby on Rails that
already exist on Mac OS X Leopard. Leopard comes pre-installed with
Ruby on Rails. It was originally Rails 1.2.3 and one of the Apple
software updates brought it up to 1.2.6. But Rails 2.0.2 is a gem
install away. You don't need to install your own Ruby or RubyGems.
That stuff is all there and can be easily updated to the latest
versions as shown in my previous post.
Absolute beginner here ... absolute ... never even used the terminal
window until today.
when I tried to update the pre-installed Ruby 1.8 it got to
"Attempting remote update of acts_as_ferret and I got this error:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/bin directory.
So I went Go > Go to Folder /usr/bin, clicked Get Info, unlocked it,
added me and administrators to the list of people who can read and
write, went back to terminal, punched in 'gem update' and got the same
error.
Yes. sudo gives you super user access for the duration of one command. The hope is that command won't be something really destructive. Here's a bit more elaboration: You typically run as a very privileged user on a Mac, but not a superuser (root). Even your privileged user account does not have default permissions to modify some of the important system directories.
So, for installation of MacPorts or Ruby Gems, you will have to use sudo. I very much recommend you never log in as root. It's a BAD idea (unless you really know what you are doing and why sudo isn't good enough).
Next visit to the terminal window, type:
man sudo
and you will see a little about what sudo allows you to do. Press 'q' to quit the man page.