After manually cleaning Ruby gems on my system, I got this error running
rails c or
It is very weird if you think about it. The
ruby -v shows that the system is using ruby version 1.9.3 managed by rvm.
But the error shows ruby 1.8.7! It must be something I did with uninstalling versions of gems where executable requirements got messed up.
Instead of imploding rvm, here’s what I did to correct the problem.
The first command uninstalls all the gems, including bundler.
After reinstalling bundler, you can run
bundle install, assuming you are in a project directory where Gemfile.lock exists.