TL DR: gem install rake -v '10.4.2'
So, I had this problem. I wanted to know why rails s will work yesterday, and not today.
First I checked if I was in the correct directory I was. Then I ran bundle install again to make sure it was installed. It was, and I was able to see it in my Gemfile.lock. Therefore, I decided that my gemset could be damaged (I use RVM). rvm gemset empty , then bundle install
However, whenever I ran rails s , I got this error. bin/rails s , as well as bundle exec rails s . But I donβt need the prefix, I want the rails to work (it works in other rails projects)
In the end, I tried gem install rake and it worked! I recommend adding the -v '10.4.2' command to the command so that you get the correct rake version. Now that I have which rake , I get a gemset for my project: "/Users/cm022291/.rvm/gems/ ruby-2.2.1@project _gemset/bin/rake"
and when I started rails s , the server will start successfully.
Caleb source share