I had this problem (with another gem that was not rake) and I was able to fix it by
gem uninstall
gem install
bundle install
bundle update
Note that the keyword 'sudo' was not used (ie. sudo bundle install) as that may place your gem into directories where your rails app might not be searching in.