`require':无法加载此类文件 - nokogiri / 2.1 / nokogiri(LoadError)

时间:2016-05-11 08:36:46

标签: ruby-on-rails ruby nokogiri

当ruby版本=> 2.2时,我看到许多答案,但在我的电脑上安装的ruby版本是[ruby 2.1.8p440] 启动服务器(rails服务器)时出现此错误。

的Gemfile

    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]

Lorem Ipsum dolor坐下来

Error when starting server

1 个答案:

答案 0 :(得分:0)

您需要运行bundle(或bundle install,但bundle执行相同的操作),以安装应用运行所必需的宝石。