Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

rake - error

when I type in the command:

rake routes

[21:06:21][example@examples-iMac ~/directory/exampleName]$ rake routes
Could not find rake-10.0.3 in any of the sources
Run `bundle install` to install missing gems.
[21:06:32][example@examples-iMac ~/directory/exampleName]$ bundle exec rake routes

[21:06:40][example@examples-iMac ~/directory/exampleName]$

why is this happening and what can I do to fix this?

8 Answers

anybody have any thoughts on this rake issue?

This is definitely a rails app. I just started it and was trying to do some things with rake like:

rake db:migrate
rake routes
rake -T

And none of these commands would work without bundle exec

All rake commands without bundle exec create the same error listed in original post

Try bundle update rake

@James I tried that and I have rake 10.0.3 installed but it still isn't working.

  • Remove all the versions of Rake ==> gem uninstall rake
  • Remove Gemfile.lock ==> rm Gemfile.lock
  • Run bundle install

    • bundle install
    • gem install rake --version=10.0.2
  • If you still get the error then put this into your gemfile.

gem 'rake', '0.8.7'

@James I found this same solution on stack overflow as well but it didn't work.... Still trying to figure it out

any thoughts today?