I know this may not be the right place to ask questions about RVM but I
couldn’t find a better forum.
I have installed RVM as well as ruby 1.9.2 and everything works just
fine except I cannot make ruby 1.9.2 my default.
This is what I did…
1-installed RVM
2-installed new versions of ruby (1.9.2)
3-typed rvm use ruby 1.9.2
and everything works fine, if I type “ruby -v” I get something like
“ruby 1.9.2p290…” which is fine, the problem is that I cannot set this
version to be my default, I tried “rvm --default use ruby 1.9.2” but if
I close and restart Terminal and type “ruby -v” it goes back to the
system default ruby version 1.8.7.
Any idea am I missing why its not working?
Is there any other way to make 1.9.2 my default, so I don’t have to
specify what version of ruby I want to use every time I open a new
Terminal window?
Is there any other way to make 1.9.2 my default, so I don’t have to
specify what version of ruby I want to use every time I open a new
Terminal window?
Thanks a lot!
The ordering of arguments is screwed up a bit in rvm.
You may create file .rvmrc in your project directory
Excuse my ignorance but where should I create this file? Sorry.
Any directory you want; when you cd into it, it’ll be invoked.
If it “goes back” to the system Ruby, you’re not invoking rvm at all.
Re-read the rvm installation guide and make sure you’ve configured
your .bash_profile properly.
This is what i currently have in my .bash_profile
[[ -s “$HOME/.rvm/scripts/rvm” ]] && source “$HOME/.rvm/scripts/rvm”
Yes, but does it work? Do you get the expected output from the test?
08:34 ~ $ type rvm | head -1
rvm is a function
09:16 ~ $
What is the result of rvm info in a freshly opened Terminal window ?
You may create file .rvmrc in your project directory
with such content:
“rvm use 1.9.2”
or with gemset
“rvm use 1.9.2@my_project_gemset”
Excuse my ignorance but where should I create this file? Sorry.
If it “goes back” to the system Ruby, you’re not invoking rvm at all.
Re-read the rvm installation guide and make sure you’ve configured
your .bash_profile properly.
This is what i currently have in my .bash_profile
[[ -s “$HOME/.rvm/scripts/rvm” ]] && source “$HOME/.rvm/scripts/rvm” #
This loads RVM into a shell session.
system:
uname: “Darwin lapMac 11.2.0 Darwin Kernel Version 11.2.0: Tue
Aug 9 20:56:15 PDT 2011; root:xnu-1699.24.8~1/RELEASE_I386 i386”
bash: “/bin/bash => GNU bash, version 3.2.48(1)-release
(x86_64-apple-darwin11)”
zsh: “/bin/zsh => zsh 4.3.11 (i386-apple-darwin11.0)”
[snip]
So your using MacPort’s ruby in /opt/local/bin/ruby It’s usually the
other
way 'round with MacPorts, no matter what you try you can’t get to switch
versions of an interpreter if MP has installed one.
First of all thank you all for your help!
The biggest problem is that I dont fully understand what MacPorts are or
how they work, I know I installed it because I needed to install
FoxRuby and its what the book (FoxRuby book) suggested to do. When
someone starts talking about installing something using
MacPorts, or Git I start sweeting (i know i need to work more on the
terminal).
Since it looks like I have some sort of mass, before I proceed I would
like to have a better understanding about the following.
1-What MacPorts are and how they work?
2-What would you guys do, unistall MacPorts than uninstall and reinstall
RVM?
2-What would you guys do, unistall MacPorts than uninstall and reinstall
RVM?
MacPorts is like a superior version of Fink. It’s a package manager for
installing open source software that grabs the tar ball for you,
compiles it
& installs it into /opt/local. /opt/local, like /usr/local, are
preferred
destinations for User installs as they a.) don’t mess with the System
software & b.) won’t get overwritten by any OS updates.
I’d be tempted to just uninstall ruby19 the description of which I
posted
earlier & if you used MacPorts to install rvm, uninstall that too
(you’ll
have to Google the vagaries on that particular one though). I wouldn’t
bother uninstalling MacPorts however. You may need it later on for other
projects.
The System Ruby, unlike the System perl, is fine to use for development
(OS
X relies heavily on perl & Apple has tweaked the configure on the OS
version), same goes for the System Python. That’s OK to use too.
If, however, you installed rvm directly from its site there’s no need to
mess with it. I suggest you spend an hour at the rvm site until you know
exactly what it does.