It seems it's a problem with your paths variable. You should see that ruby and friends did indeed get installed in the /usr/local/bin directory, which could only happen installing as root (using sudo).
Is /usr/local/bin still at the beginning of your paths when you do echo $PATH? Is your default user shell bash? My hunch is your .profile file is being ignored. Until it's resolved, as a work-around, you can refer to the ruby command using it's full path (/usr/local/bin/ruby) or create an alias to it...
alias ruby='/usr/local/bin/ruby'
Jose
···
On Sep 29, 2010, at 4:05 PM, Ast Jay <azzzz@gmx.net> wrote:
...and everything seems to go ok. I do ruby -v and I'm told I have
1.9.2, but after restarting the machine it goes back to 1.8.7 :-/
...and everything seems to go ok. I do ruby -v and I'm told I have
1.9.2, but after restarting the machine it goes back to 1.8.7 :-/
Am I doing something wrong?
Should I just use macports or fink or locomotive? I will be using it
mainly for Rails.
Thanks in advance.
1. fink is obsolete, please use macports over fink.
Macports installs in opt/local/bin which does not get overwritten when
you upgrade OSX. The gripe I have with the hivelogic way is that it
installs in /usr and that used to get overrwritten by OSX.
rvm is the preferred way as you can easily switch between various
versions of ruby. Perhaps you should post the errors you face with rvm
so the author can help you.
At any rate, do not delete the system ruby (/usr/bin/ruby) as you may
need it to compile things like vim with ruby support.
...and everything seems to go ok. I do ruby -v and I'm told I have
1.9.2, but after restarting the machine it goes back to 1.8.7 :-/
Am I doing something wrong?
It seems it's a problem with your paths variable. You should see that
ruby and friends did indeed get installed in the /usr/local/bin
directory, which could only happen installing as root (using sudo).
Is /usr/local/bin still at the beginning of your paths when you do echo
$PATH? Is your default user shell bash? My hunch is your .profile file
is being ignored. Until it's resolved, as a work-around, you can refer
to the ruby command using it's full path (/usr/local/bin/ruby) or create
an alias to it...
...and everything seems to go ok. I do ruby -v and I'm told I have
1.9.2, but after restarting the machine it goes back to 1.8.7 :-/
Am I doing something wrong?
Should I just use macports or fink or locomotive? I will be using it
mainly for Rails.
Thanks in advance.
1. fink is obsolete, please use macports over fink.
Macports installs in opt/local/bin which does not get overwritten when
you upgrade OSX. The gripe I have with the hivelogic way is that it
installs in /usr and that used to get overrwritten by OSX.
rvm is the preferred way as you can easily switch between various
versions of ruby. Perhaps you should post the errors you face with rvm
so the author can help you.
At any rate, do not delete the system ruby (/usr/bin/ruby) as you may
need it to compile things like vim with ruby support.
Thanks for the heads up about Fink - it is still listed on the rails
site, hence I considered it.
I just want a set-up that works tbh, hence being put off RVM - I am
learning rails so just want to be able to get into that and not worry
about additional errors/set-backs. Thanks to Jose I now have 1.9.2
working and if I need to upgrade again will use RVM next time, as by
then I should be a bit more knowledgeable about it all. Thanks for you
help
Apple will NOT overwrite /usr/local. In my ten years administering OS X, Apple never has, they never will. It's part of their NeXTSTEP culture.
By the way, the migration application, for copying data from old machines to new ones, now copies over /usr/local.
Jose
.......................................................
Jose Hales-Garcia
UCLA Department of Statistics
jose.halesgarcia@stat.ucla.edu
···
On Sep 29, 2010, at 10:16 PM, Rahul Kumar wrote:
Macports installs in opt/local/bin which does not get overwritten when
you upgrade OSX. The gripe I have with the hivelogic way is that it
installs in /usr and that used to get overrwritten by OSX.
Macports installs in opt/local/bin which does not get overwritten when
you upgrade OSX. The gripe I have with the hivelogic way is that it
installs in /usr and that used to get overrwritten by OSX.
Apple will NOT overwrite /usr/local. In my ten years administering OS
X, Apple never has, they never will. It's part of their NeXTSTEP
culture.
Strangely, whenever I did an OS upgrade using Software Update, (and I
mean the
minor upgrades), my /usr/local was always put into 'Deleted Folders' or
something.
I would have NO /usr/local left. Deleted. In fact, I had to create a
/usr/local for Hivelogics installs. iirc, others have also had this
problem. Thankfully, OSX does not touch or know about /opt.
To the OP, rvm installed with no problems. (I've only failed to install
macruby through RVM, but there's an installable download which works
fine.)
I did a test and found that .bash_profile overrides .profile. You should check that you don't have a .bash_profile file with a $PATH definition of its own.
I don't fully understand the subtle interactions of Bash resource files (I use TCSH myself), but you might try renaming .profile to .bash_profile.
Jose
.......................................................
Jose Hales-Garcia
UCLA Department of Statistics
jose.halesgarcia@stat.ucla.edu
I did a test and found that .bash_profile overrides .profile. You
should check that you don't have a .bash_profile file with a $PATH
definition of its own.
I don't fully understand the subtle interactions of Bash resource files
(I use TCSH myself), but you might try renaming .profile to
.bash_profile.
Jose
.......................................................
Jose Hales-Garcia
UCLA Department of Statistics
jose.halesgarcia@stat.ucla.edu
This is the content of my .bash_profile:
export PATH=$PATH:/usr/local/mysql/bin
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then source
"$HOME/.rvm/scripts/rvm" ; fi
I have replaced it's contents with that of my .profile - and it works!
Think it will be safe tho? (I uninstalled RVM so guess so?) Thanks for
your help btw Jose!