I am using rvm installed on Ubuntu 10.04 as recommended in the rvm docs (including changes to .bashrc) and all is working well with several versions of Rails, and Ruby 1.8.7 and 1.9.2. If I run rvm use 1.9.2 it says Using /home/colinl/.rvm/gems/ruby-1.9.2-p0 and if I run rvm info It shows exactly what I would expect for 1.9.2 and I can start the rails server and all is well. The problem arises if I put the above commands in a bash script: #!/usr/bin/env bash rvm use 1.9.2 rvm info When I run this it shows Using /home/colinl/.rvm/gems/ruby-1.9.2-p0 from the rvm use command, which suggests that it if finding rvm ok, but the output from rvm info is: system: system: uname: "Linux piglet 2.6.32-26-generic #48-Ubuntu SMP Wed Nov 24 09:00:03 UTC 2010 i686 GNU/Linux" bash: "/bin/bash => GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu)" zsh: " => not installed" rvm: version: "rvm 1.1.2 by Wayne E. Seguin (wayneeseguin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org) [http://rvm.beginrescueend.com/]" homes: gem: "not set" ruby: "not set" binaries: ruby: "/usr/local/bin/ruby" irb: "/usr/local/bin/irb" gem: "/usr/local/bin/gem" rake: "/usr/bin/rake" environment: PATH: "/home/colinl/bin/piglet:/home/colinl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/colinl/.rvm/bin:/home/colinl/.rvm/bin" GEM_HOME: "" GEM_PATH: "" MY_RUBY_HOME: "" IRBRC: "" RUBYOPT: "" gemset: "" Which is not right at all, it being the same as i get if I enter rvm info without preceding it with rvm use. Google has not helped me to a solution. Has anyone experienced this problem, or can suggest what I am doing wrong? Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 11 December 2010 21:53, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> I am using rvm installed on Ubuntu 10.04 as recommended in the rvm > docs (including changes to .bashrc) and all is working well with > several versions of Rails, and Ruby 1.8.7 and 1.9.2. > If I run > rvm use 1.9.2 > it says > Using /home/colinl/.rvm/gems/ruby-1.9.2-p0 > and if I run > rvm info > It shows exactly what I would expect for 1.9.2 and I can start the > rails server and all is well. > > The problem arises if I put the above commands in a bash script: > #!/usr/bin/env bash > rvm use 1.9.2 > rvm info > > When I run this it shows > Using /home/colinl/.rvm/gems/ruby-1.9.2-p0 > from the rvm use command, which suggests that it if finding rvm ok, > but the output from rvm info is:Why is it that one so often finds the solution within two minutes of posting a question over which one has been struggling for hours? The answer is at http://rvm.beginrescueend.com/workflow/scripting/ Sorry for the noise. Colin> > system: > > system: > uname: "Linux piglet 2.6.32-26-generic #48-Ubuntu SMP Wed > Nov 24 09:00:03 UTC 2010 i686 GNU/Linux" > bash: "/bin/bash => GNU bash, version 4.1.5(1)-release > (i486-pc-linux-gnu)" > zsh: " => not installed" > > rvm: > version: "rvm 1.1.2 by Wayne E. Seguin > (wayneeseguin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org) [http://rvm.beginrescueend.com/]" > > homes: > gem: "not set" > ruby: "not set" > > binaries: > ruby: "/usr/local/bin/ruby" > irb: "/usr/local/bin/irb" > gem: "/usr/local/bin/gem" > rake: "/usr/bin/rake" > > environment: > PATH: > "/home/colinl/bin/piglet:/home/colinl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/colinl/.rvm/bin:/home/colinl/.rvm/bin" > GEM_HOME: "" > GEM_PATH: "" > MY_RUBY_HOME: "" > IRBRC: "" > RUBYOPT: "" > gemset: "" > > Which is not right at all, it being the same as i get if I enter rvm > info without preceding it with rvm use. > > Google has not helped me to a solution. Has anyone experienced this > problem, or can suggest what I am doing wrong? > > Colin >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sat, Dec 11, 2010 at 3:53 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> I am using rvm installed on Ubuntu 10.04 as recommended in the rvm > docs (including changes to .bashrc) and all is working well with > several versions of Rails, and Ruby 1.8.7 and 1.9.2. > If I run > rvm use 1.9.2 > it says > Using /home/colinl/.rvm/gems/ruby-1.9.2-p0 > and if I run > rvm info > It shows exactly what I would expect for 1.9.2 and I can start the > rails server and all is well. > > The problem arises if I put the above commands in a bash script: > #!/usr/bin/env bash > rvm use 1.9.2 > rvm info >Colin, not sure if this will help at all but I have never used the ''use'' word. I do: rvm 1.9.2-p0 not rvm use 1.9.2-p0 To select the Ruby I want to use...> > When I run this it shows > Using /home/colinl/.rvm/gems/ruby-1.9.2-p0 > from the rvm use command, which suggests that it if finding rvm ok, > but the output from rvm info is: > > system: > > system: > uname: "Linux piglet 2.6.32-26-generic #48-Ubuntu SMP Wed > Nov 24 09:00:03 UTC 2010 i686 GNU/Linux" > bash: "/bin/bash => GNU bash, version 4.1.5(1)-release > (i486-pc-linux-gnu)" > zsh: " => not installed" > > rvm: > version: "rvm 1.1.2 by Wayne E. Seguin > (wayneeseguin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org) [http://rvm.beginrescueend.com/]" > > homes: > gem: "not set" > ruby: "not set" > > binaries: > ruby: "/usr/local/bin/ruby" > irb: "/usr/local/bin/irb" > gem: "/usr/local/bin/gem" > rake: "/usr/bin/rake" > > environment: > PATH: > > "/home/colinl/bin/piglet:/home/colinl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/colinl/.rvm/bin:/home/colinl/.rvm/bin" > GEM_HOME: "" > GEM_PATH: "" > MY_RUBY_HOME: "" > IRBRC: "" > RUBYOPT: "" > gemset: "" > > Which is not right at all, it being the same as i get if I enter rvm > info without preceding it with rvm use. > > Google has not helped me to a solution. Has anyone experienced this > problem, or can suggest what I am doing wrong? > > Colin > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.