Ruby problem
Phil Dobbin
phildobbin at gmail.com
Sat Mar 10 08:37:24 PST 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 09/03/2012 12:15, Phil Dobbin wrote:
> On 09/03/2012 10:35, Rainer Müller wrote:
>> Hello,
>
>> On 03/09/2012 06:53 AM, Phil Dobbin wrote:
>>> I've got iTerm2 running with six tabs. In each tab I've issued the
>>> command `rvm --default use 1.9.3` to set my ruby version. So in one
>>> shell I'll have a Rails project, another node.js, another $HOME/dev
>>> running git & so on.
>
>> As far as I understand it on their website [1], rvm modifies your PATH
>> variable to switch between different versions of a tool.
>
>> Please check to what typing ruby in your shell refers with the command
>> 'which ruby'. I assume it returns something like
>> "/Users/foo/.rvm/rubies/ruby-1.9.3/bin/ruby" as explained on the
>> website. Also check where this symlink points to.
>
>>> In one shell I clone a repository from git (repl) & switch shells to do
>>> a port search for a recommended dependent (rlwrap). I install rlwrp from
>>> Mac Ports. Switch shells again (to node) & the ruby version is now 1.8.7
>>> from /opt/local.
>
>> Please check again what 'which ruby' returns now and where the symlink
>> points to.
>
>> Running 'port' cannot modify the PATH variable of either the current or
>> any other terminal. So I don't see how MacPorts could be doing anything
>> that would modify the behavior here.
>
>> I assume rvm does not more than modifying PATH and setting up symlinks,
>> I did not find more documentation on that matter.
>
>
> Hi, Rainer.
>
> Readlink returns nothing on both
> `/Users/dobbin/.rvm/rubies/ruby-1.9.3-p0/bin/ruby` & `/opt/local/bin/ruby`.
Regarding this problem, again today I did some work using nodejs in a
shell which rvm had allocated as Ruby 1.9.3 (the value of `which ruby`
confirmed this before I started with node) & after finishing work on
node running `which ruby` returned /opt/local/bin/ruby.
Nodejs is installed into /opt/local.
Running otool -L on both Ruby versions returns:
`[Sat Mar 10 16:29:15 dobbin at darkstar:~ ] $ otool -L
/Users/dobbin/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
/Users/dobbin/.rvm/rubies/ruby-1.9.3-p0/bin/ruby:
/Users/dobbin/.rvm/rubies/ruby-1.9.3-p0/lib/libruby.1.9.1.dylib
(compatibility version 1.9.1, current version 1.9.1)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 125.2.11)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version
227.0.0)
[Sat Mar 10 16:29:35 dobbin at darkstar:~ ] $ otool -L /opt/local/bin/ruby
/opt/local/bin/ruby:
/opt/local/lib/libruby.dylib (compatibility version 1.8.0, current
version 1.8.7)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 125.2.11)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version
227.0.0)`
If anyone could shed any light on what's happening here I'd be grateful.
Cheers,
Phil...
- --
But masters, remember that I am an ass.
Though it be not written down,
yet forget not that I am an ass.
Wm. Shakespeare - Much Ado About Nothing
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: §auto-key-locate cert pka ldap hkp://keys.gnupg.net
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJPW4NBAAoJEKpMeDHWT5ADMBwIAOeLdIbLC9xDgiCtItthZthO
x6drI8JAAV9oP0Wy0eajdeDUwf1TLUoX8zVeCkCqocDugTrRuPK4U0zaa3e17+kd
GkmCQ7X3k7bCuyX1ZFiuj2G3JHkIvNe5mm5dpEOhT4tBEQsWcEJ+WOcatDlazb0Z
ykQj63G4PuzWLVpzHt4/ceiOG4XMeLFhSt99gaZplLbbwsR1D2gBmPhgFIxG7qzq
KkC2mHupB+Ed1l1X2N/1QQ9FU+UpfdNkiU2ttnJquP4XFgUQEY21+kQyjdLHqcBb
hH3rl7C9RF3R/wc6HF7pN+J0zMjxFR1NBN8RUS3UXKHkaqG1o5j3SZETnQ6PWTw=
=JNpc
-----END PGP SIGNATURE-----
More information about the macports-users
mailing list