- Install MacPorts
- Install
apple-gcc-42
via MacPorts:sudo port install apple-gcc-42
- Install RVM:
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
- Install Ruby 1.8.7 using
apple-gcc-42
:rvm install 1.8.7 --with-gcc=/opt/local/bin/gcc-apple-4.2
- Enjoy!
-
-
Save mpapis/2182557 to your computer and use it in GitHub Desktop.
Installing Ruby 1.8.7 via RVM in OS X 10.7 Lion + XCode 4.2+
it's not so obvious and not so easy to implement(the additional line), it's basically so bad idea to use the last file from the list
as implication of using .profile
- on linux it's used via sh
for login managers which breaks things badly when used with RVM (not sure about OSX)
@mpapis: one question: So when bash sees ~/.bash_profile
or ~/.bash_login
, it doesn't source .profile
anymore? But when they don't exist, it sources ~/.profile
?
quoting man bash
:
When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the
file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads
and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behav-
ior.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Or maybe I am wrong! :) Let me share this with MacPorts guys...