r/programming • • Feb 24 '13

Ruby 2.0.0

http://www.ruby-lang.org/en/news/2013/02/24/ruby-2-0-0-p0-is-released/
600 Upvotes

193 comments sorted by

View all comments

Show parent comments

3

u/[deleted] Feb 24 '13

Oh, sure. If anyone’s to blame it’s Apple… not only do they ship an outdated version of Ruby, but it’s also installed in such a way that you have to use sudo to change anything, and then you have to use sudo to run anything, and… it’s just a mess.

2

u/CaptainKabob Feb 24 '13

you have to use sudo to change anything, and then you have to use sudo to run anything, and… it’s just a mess

I think your ruby environment is misconfigured. Are you using RVM? I'd be seriously skeptical of anything that requires you to continually run as root, which is why I think you have something set up wrong (possibly from installing it as root in the first place). I'm on Mac OSX and have nothing close to that pain.

5

u/[deleted] Feb 24 '13

I think he means the system Ruby, which you do have to use sudo to install gems with.

0

u/CaptainKabob Feb 24 '13

Is there ever a reason to use the system ruby at all?

rvm use 1.9.3 --default

5

u/[deleted] Feb 24 '13

If you are writing scripts to run on other peoples systems (e.g. as part of an installer) you can't assume that they will have a newer version installed.

2

u/CaptainKabob Feb 24 '13

...which is a reason not to mess with Mac's system Ruby.

Especially if you're targeting other people's Macs and your script has the potential to blow up if they messed with the system ruby.

Tl;dr: don't mess with OSX's Ruby. Use RVM, or (in the situation you describe) settle with 1.8.7 (what OSX ships with).

2

u/[deleted] Feb 24 '13

You can't install RVM on other peoples systems.

→ More replies (0)

-3

u/xiongchiamiov Feb 24 '13
[$]> rvm install 1.8.7
[$]> rvm use 1.8.7

5

u/[deleted] Feb 24 '13

How exactly do you install RVM on other peoples systems?

→ More replies (0)

1

u/chicagobob Feb 25 '13

actually, for some processes you have to change the system ruby installed in /usr/bin ... I use rvm and did this:

ln -s ruby /Users/bob/.rvm/bin/rvm-auto-ruby

1

u/CaptainKabob Feb 25 '13

I'm curious, what processes require this?

1

u/chicagobob Feb 25 '13

In my case it was the developer tools (certain Sublime plugins, TextMate, and I think XCode too, but don't remember) for some reason sometimes used the system ruby no matter how I changed the environment.

I think they must have hard coded /usr/bin/ruby somewhere internally, so I just used the big hammer and relinked it to rvm-auto-ruby and all was happy.

I wouldn't do this on Rails server for example, RVM works fine in that case. Or especially a server where you using Apple's Blog/Wiki, or any of Apple's other built in services, etc. I think they use that ruby, but am not positive about that.