How to make 1.9.2 my default version using RVM

Hi,

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?

Thanks a lot!

···

--
Posted via http://www.ruby-forum.com/.

Fily Salas писал 24.11.2011 20:14:

Hi,

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?

Thanks a lot!

The ordering of arguments is screwed up a bit in rvm.

$ rvm use 1.9.2 --default

···

--
   WBR, Peter Zotov.

Thanks for your help.

I tried what you suggested "rvm use 1.9.2 --default" and it does work
but if I close terminal and open it agin it goes back to 1.8.7.

Any other suggestion?

Thanks a lot

···

--
Posted via http://www.ruby-forum.com/.

Yes, but does it work?

Well no, it goes back to the system default

Do you get the expected output from the test?

What test?

Thank you for your help!

···

--
Posted via http://www.ruby-forum.com/\.

Oh, sorry about the missunderstanding.

When I type "type rvm | head -1" it returns "rvm is a function"

is the how it should?

···

--
Posted via http://www.ruby-forum.com/.

What is the result of `rvm info` in a freshly opened Terminal window?

ruby-1.9.2-p290:

  >system:

uname: "Darwin lapMac..

Is there any specific line we are looking for, do you want me to copy
the whole thing?

···

--
Posted via http://www.ruby-forum.com/\.

ruby-1.9.2-p290:

  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)"

  rvm:
    version: "rvm 1.9.1 by Wayne E. Seguin (wayneeseguin@gmail.com)
[https://rvm.beginrescueend.com/]"

  ruby:
    interpreter: "ruby"
    version: "1.8.7"
    date: "2011-02-18"
    platform: "i686-darwin10"
    patchlevel: "2011-02-18 patchlevel 334"
    full_version: "ruby 1.8.7 (2011-02-18 patchlevel 334)
[i686-darwin10]"

  homes:
    gem: "/Users/useName/.rvm/gems/ruby-1.9.2-p290"
    ruby: "/Users/useName/.rvm/rubies/ruby-1.9.2-p290"

  binaries:
    ruby: "/opt/local/bin/ruby"
    irb: "/opt/local/bin/irb"
    gem: "/Users/useName/.rvm/rubies/ruby-1.9.2-p290/bin/gem"
    rake: "/Users/useName/.rvm/gems/ruby-1.9.2-p290/bin/rake"

  environment:
    PATH:
"/opt/local/bin:/opt/local/sbin:/Users/useName/.rvm/gems/ruby-1.9.2-p290/bin:/Users/useName/.rvm/gems/ruby-1.9.2-p290@global/bin:/Users/useName/.rvm/rubies/ruby-1.9.2-p290/bin:/Users/useName/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
    GEM_HOME: "/Users/useName/.rvm/gems/ruby-1.9.2-p290"
    GEM_PATH:
"/Users/useName/.rvm/gems/ruby-1.9.2-p290:/Users/useName/.rvm/gems/ruby-1.9.2-p290@global"
    MY_RUBY_HOME: "/Users/useName/.rvm/rubies/ruby-1.9.2-p290"
    IRBRC: "/Users/useName/.rvm/rubies/ruby-1.9.2-p290/.irbrc"
    RUBYOPT: ""
    gemset: ""

Thanks a lot

···

--
Posted via http://www.ruby-forum.com/.

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. 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?

Thanks a lot for your patient

···

--
Posted via http://www.ruby-forum.com/.

Thanks a lot for your help! I will try to read more to have a better
understanding and will come back to this forum with more questions,
sorry, I hope you guys dont mind.

···

--
Posted via http://www.ruby-forum.com/.

Thanks a lot for your help!

···

--
Posted via http://www.ruby-forum.com/.

Hi

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"

В Птн, 25/11/2011 в 01:31 +0900, Fily Salas пишет:

···

Thanks for your help.

I tried what you suggested "rvm use 1.9.2 --default" and it does work
but if I close terminal and open it agin it goes back to 1.8.7.

Any other suggestion?

Thanks a lot

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.

···

On Thu, Nov 24, 2011 at 8:31 AM, Fily Salas <fs_tigre@hotmail.com> wrote:

I tried what you suggested "rvm use 1.9.2 --default" and it does work
but if I close terminal and open it agin it goes back to 1.8.7.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

twitter: @hassan

Yes, but does it work?

Well no, it goes back to the system default

Do you get the expected output from the test?

What test?

Uh, the one on the RVM installation instructions page that I suggested
you re-read (and then quoted in my reply):

08:34 ~ $ type rvm | head -1
rvm is a function
09:16 ~ $

You could also answer this question from the previous reply:

···

On Thu, Nov 24, 2011 at 11:02 AM, Fily Salas <fs_tigre@hotmail.com> wrote:

What is the result of `rvm info` in a freshly opened Terminal window ?

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

twitter: @hassan

Oh, sorry about the missunderstanding.

When I type "type rvm | head -1" it returns "rvm is a function"

**and**

What is the result of `rvm info` in a freshly opened Terminal window?

If you don't read emails in their entirety, it's going to take a lot longer
to get the the solution...

···

On Thu, Nov 24, 2011 at 11:30 AM, Fily Salas <fs_tigre@hotmail.com> wrote:

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

twitter: @hassan

Uh, yeah. Copy the whole output, then post it...

Cheers,

    Phil...

···

On 24/11/11 20:15, "Fily Salas" <fs_tigre@hotmail.com> wrote:

Is there any specific line we are looking for, do you want me to copy
the whole thing?

--
Nothing to see here... move along, move along

That would have been the obvious response, but in any case -- this
appears to show you *are* using rvm's ruby 1.9.2; why did you think
you're not?

···

On Thu, Nov 24, 2011 at 12:15 PM, Fily Salas <fs_tigre@hotmail.com> wrote:

What is the result of `rvm info` in a freshly opened Terminal window?

ruby-1.9.2-p290:

Is there any specific line we are looking for, do you want me to copy
the whole thing?

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

twitter: @hassan

Did you previously install a version of Ruby using MacPorts or Brew
or something? The built-in Apple Ruby shows up as:

  binaries:
    ruby: "/usr/bin/ruby"
    irb: "/usr/bin/irb"
    gem: "/usr/bin/gem"
    rake: "/usr/bin/rake"

However that /opt/local junk got there, you need to get rid of it...

···

On Thu, Nov 24, 2011 at 12:24 PM, Fily Salas <fs_tigre@hotmail.com> wrote:

binaries:
ruby: "/opt/local/bin/ruby"
irb: "/opt/local/bin/irb"

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

twitter: @hassan

[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.

Try putting this in your .bash_profile

`export PATH=$PATH:/opt/local/bin/ruby`

Cheers,

    Phil...

···

On 24/11/11 20:24, "Fily Salas" <fs_tigre@hotmail.com> wrote:

ruby-1.9.2-p290:

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)"

--
Nothing to see here... move along, move along

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.

Cheers,

    Phil...

···

On 24/11/11 21:59, "Fily Salas" <fs_tigre@hotmail.com> wrote:

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. 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?

--
Nothing to see here... move along, move along

No problem.

Cheers,

    Phil...

···

On 25/11/11 15:54, "Fily Salas" <fs_tigre@hotmail.com> wrote:

Thanks a lot for your help!

--
Nothing to see here... move along, move along