Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

General Discussion

Lens Alexis
Lens Alexis
2,857 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!