[LRUG] Rails/RVM path confusion

Duncan Stuart dgmstuart at gmail.com
Sat Sep 21 20:34:27 PDT 2013


I don't know if this is relevant, but the docs suggest you need to include
'use' before specifying the gemset when you're using the command line (but
not when scripting):

from command line: rvm --rvmrc --create use 1.9.2 at funky
for scripting: rvm rvmrc create 1.9.2 at funky

Do you definitely need to create a named project-specific gemset? If you
look in .rvm/gems/, has your @r1 gemset been created?

Are you sure your rails path is correct in your question? I'd have
expected .rvm/gems/<<something>>
rather than .rvm/rubies/<<something>>

Hope this helps.

Regarding point 2 - my understanding is that the rvm line you pasted adds
all the gemsets (.rvm/gems/) for the current ruby version (rvm current)
into your path.


On 21 September 2013 22:35, gvim <gvimrc at gmail.com> wrote:

> I install Ruby 2.0.0 and Rails 4.0.0 via RVM on OS X 10.8 in my standard
> user account. Fine. I check my `ruby` and `rails` are both coming from the
> right place. Good so far:
>
> /Users/<me>/.rvm/rubies/ruby-**2.0.0-p247/bin/ruby
> /Users/<me>/.rvm/rubies/ruby-**2.0.0-p247/bin/rails
>
> Next, I create my first Rails app with `rails new r1` and inside the new
> r1 app directory I setup my .rvmrc with `rvm --rvmrc --create 2.0.0 at r1`
> but `which rails` now returns  /usr/local/rails so I check my $PATH and
> discover that:
>
> /Users/<me>/.rvm/rubies/ruby-**2.0.0-p247/bin
>
> ... had now become
>
> /Users/<me>/.rvm/rubies/ruby-**2.0.0-p247 at global/bin
>
> ... which explains why my newly installed rails binary can't be found
>
> So, 2 questions:
>
> 1. Why has my rails path become screwed? Must I REALLY have a new PATH
> entry for every Rails app I create?
> 2. What magic is Ruby/Rails/RVM using to alter my PATH because ~/.bashrc
> doesn't contain everything in $PATH and ~/.bash_profile only contains:
>
> [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
>
> gvim
> ______________________________**_________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/**listinfo.cgi/chat-lrug.org<http://lists.lrug.org/listinfo.cgi/chat-lrug.org>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20130922/41a445b4/attachment-0003.html>


More information about the Chat mailing list