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.
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"
我之前曾遇到过这个问题,您可以尝试使用gem install nokigiri
手动gem install nokigiri
Have you try
$bundle update
?
Can you post the error logs to see if it is a Permissions Error or something else?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.