Question

I followed 2 different guides to install ruby on OSX and I think I messed some things up. Now that I know what I'm doing a bit more I have a feeling something is wrong. I'd like to 'start fresh' but i dont know what to remove safely (I dont mind re-installing everything. I have nothing super important)

I first used rvm and then decided i wanted to use homebrew. I uninstalled rails with rvm and then 'imploded' rvm. I then installed homebrew and then brew install rails 1.9.3

Although... when i run gem install xxx, all my gems seem to be in a weird path?

For instance, sinatra.rb is installed here:

/usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.1/lib

Notice it says 1.9.1, yet when I run

ruby -v 

I get 1.9.3p0

and which ruby i get this

/usr/local/Cellar/ruby/1.9.3-p0/bin/ruby

If i do which [rails,git,mysql,whatever]

they all seem to point to Cellar.

as a sidenote, i have two versions of sinatra.rb on my computer... this is where the other one is (although the one I'm pretty sure it's not using).

/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/sinatra-1.2.0/lib

kind of ridiculous...

I'm not sure whats going on here.

This is my path if that helps:

export LSCOLORS="GxGxBxDxCxEgEdxbxgxcxd"
export CLICOLOR=1
export PATH=/usr/local/Cellar/ruby/1.9.3-p0/bin:/usr/local/mysql-5.5.18-osx10.6-x86_64/bin:/usr/local/bin:$PATH
Was it helpful?

Solution

That's fine. You are using 1.9.3. The gems are installed under a 1.9.1 directory, to distinguish them from gems installed for 1.8.7 (some gems that work with the 1.9 series don't with 1.8, and vice-versa). 1.9.1 was the first released version of the 1.9 series.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top