ArchiButtle
ArchiButtle

Reputation: 1

Ruby on Rails : Rake db:create -> Could not find gem

I begin with ruby on rails and I'm trying to create my first blog. So i ran:

rails new blog -database=mysql

There was an error:

Gem::InstallError: The 'json' native gem requires installed build tools.

But since i saw a json directory in my blog's directory i didn't care. So i run the command to create the database:

rake db:create --trace 

And i had another error:

Could not find gem 'rails (= 3.1.3) x86-mingw32' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems.

Does anybody knows what is the problem?

Upvotes: 0

Views: 2685

Answers (2)

Nikita Teplyakov
Nikita Teplyakov

Reputation: 11

Also may need to run

bundle exec rake db:create

Upvotes: 1

Duong Quang Ha
Duong Quang Ha

Reputation: 31

you can try "gem list | grep json" to check if json is already install. Then, you can add following line in Gemfile (in your site's directory):

gem 'json'

and then

bundle install json or bundle update json

Good luck,

Upvotes: 0

Related Questions