I\'ve tried a number of things like uninstalling/reinstalling rails and gems but to no avail.
When I go into my new project and run rails s or bundle exec rails serv
My problem was I was using an outdated version of ruby 1.9.3 with rails 4.2. I upgraded to 2.1.2 , removed the broken project, ran rails new blog to recreate my project, navigated into my newly created app and ran rails server and it worked.
I just had this problem and found that it was being caused by the fact that I had removed a gem from the gemfile without deleting the other require
references. In my case, I just had to remove it from config/application.rb.
This is work for me.
gem uninstall mysql2
bundle install
or gem install mysql2
rake rails:update:bin
gives additional errors:I had recently been doing some server maintenance and had subsequently updated OpenSSL.
When I tried running the rake rails:update:bin
command, I was presented with an error relating to openSSL.
Having rebuilt my version of Ruby (`rvm reinstall ruby-x.x.x' with RVM), both errors went away.
This is always worth a try I guess.
I was getting the same error. Removed spring from Gemfile and re-bundled. Not really a solution though.
I found the code that created this error in config/initializers/an_initializer.rb
require "lib/a_file_i_need"
I changed it for
require "#{ Rails.root }/lib/a_file_i_need"
rake rails:update:bin
to the rescue.