Error rake db:create

Asked

Viewed 465 times

1

Good afternoon,

I am using someone else’s program developed in Ruby on Rails and after giving bundle install in the project folder and install all gems, I tried to create the database through the commands:

rake db:create and rake db:migrate

But the following error is occurring:

Gem::Loaderror: You have already Activated rake 10.4.2, but your Gemfile requires rake 10.3.1. Prepending bundle exec to your command may Solve this.

I looked for some solution, but I could not solve

1 answer

3


This is because you are using rake version 10.4.2 and the system is ordering version 10.3.1.

You have 2 options:

1) Uninstall the current Gem and install the version the program is requesting.

  • open cmd and navigate to your project directory
  • type the command: gem uninstall rake -v 10.4.2
  • type the command: gem install rake -v 10.3.1

2) Change your project’s Gemfile files, where you are specifying the rake version to 10.3.1 and switch to 10.4.2

After one of these two options run bundle install so that the Gems can be updated according to the new version of the rake.

Then test again the procedure you want.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.