1

I'm following some tutorials of association in rails database, the first step is to create the app with rails new newProject -B. Then i create the two models with rails g scaffold Father name:string and rails g scaffold Child name:string sex:string father:references.

After that i try to create the database with the command rake db:create, but an error appears:

Could not find nokogiri-1.6.7.1 in any of the sources Run bundle install to install missing gems.

I run the command bundle install normally, but when i tried again, the same error appears. I tried to insert in the GemFile gem 'nokogiri', '~> 1.6', '>= 1.6.7.1' and the same error persists.

3 Answers3

1

I had a similar issue with nokogiri a couple of months ago.

I solved it by adding '-rc3' to the end of the gem version, like this:

gem "nokogiri", ">= 1.6.7.rc3"
0

I've had this problem a few times before, you can try installing the gem manually using gem install nokigiri

Jayem
  • 215
  • 2
  • 9
  • take a look at this, this might help you: http://stackoverflow.com/questions/19643153/error-to-install-nokogiri-on-osx-10-9-maverick/19807558#19807558 – Jayem Dec 17 '15 at 19:29
  • The problem is that i know the gem is installed, when i run the command `gem list` , nokogiri (1.6.7.1) is listed there. – Leonardo Campanha Dec 17 '15 at 19:44
0

Have you try

$bundle update ?

Can you post the error logs to see if it is a Permissions Error or something else?

Ruby Doggy
  • 109
  • 5
  • I did that, and now when i run `rake db:create` This error appears: NoMethodError: undefined method `>' for < 2.0, >= 1.3.0:Gem::Requirement /vagrant/projetoAssoc/config/boot.rb:3:in `' /vagrant/projetoAssoc/config/application.rb:1:in `' /vagrant/projetoAssoc/Rakefile:4:in `' (See full trace by running task with --trace) – Leonardo Campanha Dec 18 '15 at 11:34