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

General Discussion

Lens Alexis
Lens Alexis
3,320 Points

Writing Tests > Validating Presence

After fixing the "users.yml" to:

require 'test_helper'

class UserTest < ActiveSupport::TestCase test "a user should enter a first name" do user = User.new assert !user.save end end

The next step was to migrate it by typing rake db:migrate in my terminal but i get this message saying:

"Rake Aborted! You have already activated rake 10.0.4, but your Gemfile requires rake. Using bundle exec may solve this. (See full trace by running task with --trace) "

Of course i used bundle exec to run rake db:migrate, i get the same thing.

Please answer to this as soon as possible. I refuse to put this project on hold.

Thank you.

1 Answer

I came across the same issue and I believe the way I solved it was to add

 gem 'rake', '10.0.4'

to my Gemfile, followed by running bundle install.

Good luck!