Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby on rails :- Could not find RubyGem rails (>= 0) (Gem::LoadError)

I am very new to Ruby on Rails. I installed ruby on rails on my Windows 7 using the installer in http://railsinstaller.org/. I could create a project once and thereafter I was not (I dont know what did I do in between :-( ).

The complete errors messages are :-

On creating a new project :-

c:\Sites>rails new Tickets_Test
E:/Ashish/Ruby192/lib/ruby/1.9.1/rubygems.rb:762:in `report_activate_error': Cou
ld not find RubyGem rails (>= 0) (Gem::LoadError)
        from E:/Ashish/Ruby192/lib/ruby/1.9.1/rubygems.rb:219:in `activate'
        from E:/Ashish/Ruby192/lib/ruby/1.9.1/rubygems.rb:1065:in `gem'
        from E:/Ashish/RailsInstaller/Ruby1.8.7/bin/rails:18:in `<main>'

on just getting the version:-

c:\Sites>rails --version
E:/Ashish/Ruby192/lib/ruby/1.9.1/rubygems.rb:762:in `report_activate_error': Cou
ld not find RubyGem rails (>= 0) (Gem::LoadError)
        from E:/Ashish/Ruby192/lib/ruby/1.9.1/rubygems.rb:219:in `activate'
        from E:/Ashish/Ruby192/lib/ruby/1.9.1/rubygems.rb:1065:in `gem'
        from E:/Ashish/RailsInstaller/Ruby1.8.7/bin/rails:18:in `<main>'

Any idea why the above is happening?

EDIT

Appearently there are two command prompts :- Ruby command prompt :- Ruby and Ruby for rails command prompt (The problem is resolved using this command prompt):- Ruby on rails

I was using ruby command prompt. Sounds like a stupid question, however, I am not sure how there are "two" command prompts?

like image 334
Ashish Gupta Avatar asked Jul 10 '26 13:07

Ashish Gupta


1 Answers

I ran into a similar issues after installing heroku toolbelt. I found that heroku added the second one to my path. I removed it from the path and life seems good again!

like image 113
Steven Avatar answered Jul 12 '26 04:07

Steven



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!