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 at http://railsinstaller.org/ . I could create a project once, and then I was not (I do not know what I was doing between them :-().

Full error messages: -

When 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>'

for version only : -

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 this is happening?

EDIT

Two commands appear: - Ruby command line: - Ruby and also Ruby for rails command prompt (the problem is solved using this command line): - Ruby on rails

I used the ruby ​​command line. Sounds like a dumb question, however, I'm not sure how there are β€œtwo” command lines?

+3
4

, Ruby , 1.9.1 1.8.7. Rails gem, , . Rails.

+4

heroku. , . , !

+5

Ruby, 1.9.1 1.8.7, . Ruby RVM OS X Linux. Windows Pik.

- http://rorguide.blogspot.com/2011/03/pik-rvm-tools-to-manage-multiple-ruby.html

+2

Try using Pik (available at http://github.com ) to switch between the two or edit your path to include one but not the other. It is easier.

+1
source

Source: https://habr.com/ru/post/1792488/


All Articles