0

Versions, dependencies, and other information:

For some reason, whenever I run any gem based command, it gives me this error:

$ rails s
c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/rubygems.rb:30:in `require': cannot l
oad such file -- rubygems/defaults (LoadError)
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/rubygems.rb:30:in `<top
(required)>'
        from <internal:gem_prelude>:1:in `require'
        from <internal:gem_prelude>:1:in `<compiled>'

I have tried deleting ruby 2.0.0 from pik and the rails installer folder, because another SO thread said that would fix it. The commands were working as of 5 hours ago, and must have stopped right when I finished using the rails console (part of learning rails from this tutorial, it was just basic math and string manipulation, so I don't think I screwed something up). Any ideas on what I should do?

carols10cents
  • 6,943
  • 7
  • 39
  • 56

2 Answers2

0

Try deleting 'ruby '1.9.3' ' from your gem file. It shouldn't be causing a problem, but I've seen situations where it has.

Philip7899
  • 4,599
  • 4
  • 55
  • 114
  • It didn't do anything. Is there anything else I should try? – user3029002 Dec 01 '13 at 14:27
  • did you run bundle install after deleting it? – Philip7899 Dec 01 '13 at 22:12
  • Yes, and when that happens it takes a loooong time to "resolve dependencies," even though it didn't use to do that. I let it sit for two hours, uninterrupted, and it was still un-resolved. – user3029002 Dec 01 '13 at 23:30
  • Then something is definitely wrong with the gem file. The only suggestion i have is to separate your :test and :development blocks. So have one :test block and one :development block, and repeat gems if necessary. This isn't the proper way, but if it works you'll have an idea of what to fix. – Philip7899 Dec 02 '13 at 00:58
  • Um, I'm new to rails, and ruby in general, but I don't understand. Aren't the blocks already separated? They each have their own do/end block in my gemfile. – user3029002 Dec 02 '13 at 01:36
  • I just realized, are you in the right directory? What directory are you running commands in? – Philip7899 Dec 02 '13 at 02:20
  • I am running all of my commands in the directory for the rails app. Would it change anything knowing that I reinstalled rails using the windows railsinstaller to fix the problem first sparking this question? – user3029002 Dec 02 '13 at 23:34
0

I don't know if I did something I don't know about, but to the best of my knowledge, adding the gem "bootstrap-sass" at version 2.3.2.0 got it working again. I doubt that it was adding that exact gem that was the solution, but you never know.

Mr Lister
  • 45,515
  • 15
  • 108
  • 150