Can't get ruby 1.9 to work after install on OSX

Hello

I installed ruby 1.9 along with 1.8 and my .profile path looks like
this:

export
PATH=/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/lib:$PATH
export PATH=/Users/musdev/.gem/ruby/1.9/bin:$PATH
export PATH=/Users/musdev/.gem/ruby/1.8/bin:$PATH
export PATH=/Users/musdev/.vim/bin:$PATH

But when I type in ruby -v in the terminal I still see
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.6.0]

and when I type which ruby in the terminal I see
/usr/local/bin/ruby

How do I get ruby 1.9 into my .gem file, if thats where it needs to be?
Thanks

Musdev

Not sure what youre doing here…

You should try rvm first of all…

Second…

Get your 1.9 path and export it

Export /opt/ruby/bin;$PATH

Also read this : Dan Benjamin

Joseph E. Savard wrote:

Not sure what youre doing here…

You should try rvm first of all…

Second…

Get your 1.9 path and export it

Export /opt/ruby/bin;$PATH

Also read this : Dan Benjamin

Sorry about that I should have been a little clearer. I was trying to
use both 1.8 and 1.9 interchangeably. I wanted to be able to switch back
and forth when coding.

I will try this out and post what happens.

Thanks

Check you PATH
echo $PATH in terminal
which of ruby bin files are first to be found would be the one is used
as default

RVM is your best bet… The work is already done for you through scripts
and
such.

http://rvm.beginrescueend.com/rvm/install/

Vitaliy Y. wrote:

Check you PATH
echo $PATH in terminal
which of ruby bin files are first to be found would be the one is used
as default

Okay I see, When I want to run a ruby program, I just use ruby19 file.rb
instead of the first ruby file.rb found in bin and it works :slight_smile:

Thanks

Joseph E. Savard wrote:

RVM is your best bet… The work is already done for you through scripts
and
such.

http://rvm.beginrescueend.com/rvm/install/

Hey Joe

I need help integrating textmate with 1.9. Right now at default its
integrating with 1.8.6

I went through the steps via rvm(I love this) here at
http://rvm.beginrescueend.com/integration/textmate/
I followed every single step, but every time I run a rb file I get this
error message:

ERROR: Missing RVM environment file:
‘/Users/musdev/.rvm/environments/system’

I looked in that directory located the system file but there was nothing
written to the system file. Im missing something, could u guide me in
the right direction to get up and running?

Thanks you

Or you can always default to the Ruby you want to use.

Example:

rvm --default 1.9.1

On Wed, Jul 21, 2010 at 09:11, Joseph E. Savard <

Musdev,

Yhea, this is an issue of textmate’s path as it launched. I normally
launch
this from the command line with in the RVM terminal I am working in.

If you launch textmate from CMD-SpaceBar or launch it from finder it
will
take on the path of your system. This, in many cases, will not be the
RVM
youv’e setup.

I would launch textmate from the terminal

ie: mate ~/dev/foo0 &

Make sense?

I wouldn’t make RVM my standard shell. In this case I think he wants to
bounce back an forth.

Therefore, its better to handle it from the shell.

But, as you say you could default it if you are using only one versioned
environment. And that being the case why use RVM at all?

Cheers mate,
j

Joseph E. Savard wrote:

I did forget to mention, and my intention was to…

Have you set the PATH in your TEXTMATE as an alternative from prefs.

But your faced with the same issue on changing versions frequently.

I see guys, thank you for the help and advice, I guess i’ll stick to the
shell if i’m going to be switching environments back and forth. Thank
you

Regards
Musdev

I did forget to mention, and my intention was to…

Have you set the PATH in your TEXTMATE as an alternative from prefs.

But your faced with the same issue on changing versions frequently.