wayneeseguin/rvm — Issue #649: path-identifier not working as expected
Author: mhale
Created: 2011-12-20 04:15:19+00:00
State: open

Using rvm 1.10 on Ubuntu 10.04 and bash, the path-identifier command is returning the global gemset instead of the application gemset if it is not run from the same folder as the rvmrc. For example, in my home directory I get the global gemset:

12:04:21 mhale:~$ rvm tools path-identifier /var/vhosts/admin.app01.com.au/current
ruby-1.9.3-p0@global

But if I change to the directory with the rvmrc in it, I get the app gemset:

12:09:16 mhale:~$ cd /var/vhosts/admin.app01.com.au/current
Using /usr/local/rvm/gems/ruby-1.9.3-p0 with gemset app

12:09:22 mhale:/var/vhosts/admin.app01.com.au/current$ rvm tools path-identifier /var/vhosts/admin.app01.com.au/current
ruby-1.9.3-p0@app

The rvmrc contains:

rvm use ruby-1.9.3-p0@app --create

Previous versions of rvm didn't do this.

The output of rvm info is here:

https://gist.github.com/1500196

The output from the trace of the first command is here:

https://gist.github.com/1500201

This is a problem because it breaks the setup_load_paths.rb file that lots of Rails apps use, as the gem calls path-identifier to read the rvmrc. This forces gems to be installed in the global gemset.