Shawn
Shawn

Reputation: 643

Ruby Upgrade for Rails 3 Install

I seem to have gotten myself turned around while trying to install Rails 3 and haven't been able to figure out what I'm doing wrong. Prior to trying to upgrade I was on 2.3.2 Here's what I have thus far...

$ which ruby

/usr/local/bin/ruby

$ ruby -v

ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.8.0]

$ which rails

/usr/bin/rails

$ rails -v

Rails 3 requires Ruby 1.8.7 or 1.9.2. You're running ruby 1.8.6 (2009-06-08)
Please upgrade to continue.

I tried installing rvm by pasting the following into the Terminal

bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )

After receiving the welcome message I wanted to verify that it was installed but entering

type rvm | head -n1

returned

-bash: type: rvm: not found

Any ideas what I'm doing wrong and/or how I can go about moving forward? Thanks in advance for any insight...

BTW - I'm Mac OSX 10.5.8 and

Upvotes: 1

Views: 538

Answers (2)

ab217
ab217

Reputation: 17160

The reason you got that error saying -bash: type: rvm: not found is because once installing the rvm for the first time, you need to add this line of code to your ~/.bash_profile:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session.

Restart the terminal, and now when you type type rvm | head -n1 it will work.

Upvotes: 2

JP Silvashy
JP Silvashy

Reputation: 48525

I'm wondering, did you install ruby originally with macports or some other package manager? I think by default ruby should be installed at /usr/bin/ruby. If I was you I'd just go delete /usr/local/bin/ruby and and compile and install from source.

Go pick up 1.9.2 (which is out of beta) here: http://www.ruby-lang.org/en/downloads/

and make and install it, then check your PATH vars and see if the path is in there.

I find just starting clean slate to be the easiest, I also feel like RVM makes things a little overly complex.

Upvotes: 1

Related Questions