Ruby and Rails has been running fine on my Mac, but I'm suddenly having some problems. When I try to run the server or generate a model (i.e. use the 'rails' command in anyway) I get this error
/Users/tm/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/rubygems_integration.rb:187:in `stub_source_index170': uninitialized constant Gem::SourceIndex (NameError)
from /Users/tm/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/rubygems_integration.rb:353:in `stub_rubygems'
from /Users/tm/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/rubygems_integration.rb:250:in `replace_entrypoints'
from /Users/tm/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:14:in `setup'
from /Users/tm/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler.rb:116:in `setup'
from /Users/tm/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/setup.rb:7:in `<top (required)>'
from /Users/tm/.rbenv/versions/1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `require'
from /Users/tm/.rbenv/versions/1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
from /Users/tm/.rbenv/versions/1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:35:in `require'
from /Users/tm/Sites/anwaltythree/config/boot.rb:6:in `<top (required)>'
from /Users/tm/.rbenv/versions/1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/tm/.rbenv/versions/1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from script/rails:5:in `<main>'
I randomly tried to run bundle update and got this error
Fetching gem metadata from https://rubygems.org/..
NoMethodError: private method `open' called for Gem::Package:Class
An error occurred while installing rake (10.0.4), and Bundler cannot continue.
Make sure that `gem install rake -v '10.0.4'` succeeds before bundling.
Following its instructions, I installed rake
gem install rake -v '10.0.4'
Successfully installed rake-10.0.4
Installing ri documentation for rake-10.0.4
However, I get the same errors with the 'rails' command and bundle update as described above.
The error is occurring across multiple project folders.
The only difference between today and yesterday (when everything worked fine) is that I installed jekyll last night and, while troubleshooting that, ran some 'sudo' commands, which I normally don't ever have to run. I have no idea whether that's related to the current problem. I'm just providing context.
I'm at a loss for what to do next. Can you suggest what I might try