简体   繁体   中英

Ruby on Rails missing nokogiri /nokogiri

I'm doing a tutorial on Ruby on Rails from Lynda, and everything has gone the way it should. All installations and everything has worked flawless.

But after creating a project, when I try to start the server (cmd: rails server) I get the error message:

LoadError: cannot load such file -- nokogiri/nokogiri

I have * Windows 7 x64 * Rails 4.2.4, * Gem 2.4.8.

I'm in the directory of the project. All files are there, everything looks ok. I created my project like this: ruby new test_cms and I also tried this: ruby new my_cms -d mysql . Same result.

Any ideas?

It looks as though nokogiri isn't be loaded, so you need it. So first think to do is check that it is in your Gemfile. If it is - move it to the top (I know - strange but it sometimes sorts out similar issues). If it's not, add it:

  gem 'nokogiri'

Then run bundle install again.

Then try running bundle exec rails server to run the server with your bundle. You may be running it out of context.

If 'nokogirl' is located in your Gemfile maybe try updating your gems. try $ gem update --system .

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM