簡體   English   中英

如何修復“require”:無法加載此類文件 — nokogiri/2.1/nokogiri (LoadError)

[英]How to fix `require': cannot load such file — nokogiri/2.1/nokogiri (LoadError)

當 ruby​​ 版本 =>2.2 時,我看到很多關於此錯誤的答案,但在我的計算機上安裝的 ruby​​ 版本是 [ruby 2.1.8p440] 啟動服務器( rails server )時出現此錯誤。

文件

    source 'http://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
gem 'pg', '0.18.2'
# Use SCSS for stylesheets
#gem 'sass-rails', '~> 4.0.3'

gem 'rails_12factor', group: :production


# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer',  platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',          group: :doc

# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]
gem 'sass-rails', '>= 3.3.4'
gem 'bootstrap-sass', '~> 3.3.6'

gem 'ckeditor', '4.1.6'
gem 'carrierwave', '0.10.0'
gem 'fog', '~> 1.3.1'
gem 'mini_magick', '4.5.1'
gem 'will_paginate', '3.1.0'
gem 'nokogiri', '>= 1.5.0'


# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin]

啟動服務器時出錯

您需要運行bundle (或bundle install ,但bundle做同樣的事情),以安裝應用程序運行所需的 gem。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM