Steve Hayes
2012-Jul-28 07:44 UTC
Problem with rails installation, even when running rails -v
Been happily using rails for some time, upgrading to latest stable versions along the way but over the last week something has changed, now rails isn''t happy. Any idea on what might have changed? Given I''m on ruby 1.9.3 I can''t see why when I call rails -v it is referring to ruby 1.8. Any guidance would be appreciated. Could it be anything to do symbollic links? My Ruby version: MyRuby$ *ruby -v* ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux] But...rails isn''t happy MyRuby$ *rails -v* /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs'': Could not find rails (>= 0) amongst [bundler-1.1.5, pg-0.14.0] (Gem::LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'' from /usr/local/lib/site_ruby/1.8/rubygems.rb:1200:in `gem'' from /usr/bin/rails:18 MyRuby$ *$PATH* bash: /usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin:/home/steve/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/sm/pkg/active/bin:/sm/pkg/active/sbin:/home/steve/.rvm/bin: No such file or directory -- 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. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/8g08rpPAKTgJ. For more options, visit https://groups.google.com/groups/opt_out.
ben sharman
2012-Jul-29 15:07 UTC
Re: Problem with rails installation, even when running rails -v
Hi Steve, Looks to me like you are defaulting to the system versions. As you are using rvm did you follow these steps? rvm install 1.9.3-p194 rvm use 1.9.3-p194 --default Let me know if this works for you. Ben On Saturday, July 28, 2012 2:44:12 PM UTC+7, Steve Hayes wrote:> > Been happily using rails for some time, upgrading to latest stable > versions along the way but over the last week something has changed, now > rails isn''t happy. Any idea on what might have changed? Given I''m on ruby > 1.9.3 I can''t see why when I call rails -v it is referring to ruby 1.8. Any > guidance would be appreciated. Could it be anything to do symbollic links? > > My Ruby version: > > MyRuby$ *ruby -v* > ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux] > > But...rails isn''t happy > > MyRuby$ *rails -v* > /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs'': > Could not find rails (>= 0) amongst [bundler-1.1.5, pg-0.14.0] > (Gem::LoadError) > from /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'' > from /usr/local/lib/site_ruby/1.8/rubygems.rb:1200:in `gem'' > from /usr/bin/rails:18 > > MyRuby$ *$PATH* > bash: > /usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin:/home/steve/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/sm/pkg/active/bin:/sm/pkg/active/sbin:/home/steve/.rvm/bin: > No such file or directory > > > > > > > > >-- 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. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/OOBCbjs9rF8J. For more options, visit https://groups.google.com/groups/opt_out.
Stevie Hayes
2012-Aug-05 07:07 UTC
Re: Problem with rails installation, even when running rails -v
ben sharman wrote in post #1070632:> Hi Steve, > > Looks to me like you are defaulting to the system versions. > > As you are using rvm did you follow these steps? > > rvm install 1.9.3-p194 > > rvm use 1.9.3-p194 --default > > Let me know if this works for you. > > BenHey Ben Sharman, Thanks for replying. I tried everything and it didn''t work. I also found that jumping across the forums, trying different solutions wasn''t helping either. I realised after a while that I had a fundamental issue. My system was broken to the point where it would/couldn''t be set up properly. Why? Because at some point I used Sudo to re-configure a vital Ruby/Rails directory when it wouldn''t work first time. That was fatal. No matter what I tried I wasn''t able to get back to where I''d been. What solved it? After weeks of trying variations on the normal set ups such as you suggest in your answer to get things working and also trying to check and re-check the chown status of various directories. In the end I backed up all my important data, made an Ubuntu 12.04 boot disc and re-installed the OS entirely again. Not using Sudo where I shouldn''t meant my Ruby and rails installations when smoothly. There are pitfall though because when you get into trouble there it lots of information out there that can lead the unwary to use Sudo here and there on their Ruby or Rails installation but I found the hard way to steer completely away from using Sudo unless specifically told to by the person(s) who have developed the solution you want to work with. It''s been a tough lesson, one I''m slightly embarrassed about in that I''ve had to re-build my system again from scratch but hopefully anyone reading this who''s having the same trouble that seems to go on for a long time will ultimately know they have a tough decision ahead of them: Backup and start again. May not always make sense in every case but for me it worked. Steve. -- Posted via http://www.ruby-forum.com/. -- 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 https://groups.google.com/groups/opt_out.