`require':126:找不到指定的模块。 - ../Ruby24-x64/lib/ruby/gems/2.4.0/gems/rmagick-2.16.0/lib/RMagick2.so(LoadError)

时间:2017-12-12 10:46:47

标签: ruby-on-rails rmagick

我有一个现有的项目。我已经升级到Ruby24-x64,我试图运行它,但我收到上述错误。我已经尝试了2天但没有运气。我正面临与RMagick相关的上述问题。

如果有人对上述错误有所了解,请告诉我。

提前致谢。

这是我的Gemfile。

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
# gem 'rails', '4.0.0'
gem 'rails', '>= 5.0.0.rc2', '< 5.1'


# Use mysql as the database for Active Record
gem 'mysql2'
# gem 'mysql2', '~> 0.3.18'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
 #gem 'pg'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.1.0'

gem "rspec"
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby
#gem 'will_paginate', '~> 3.0.6'

# 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', '~> 1.2'
gem 'shareable'
gem 'pry'
gem 'social-share-button'

gem 'pry-nav'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

group :development do
 gem 'meta_request'
 # gem "letter_opener"
end

gem 'roo'
gem 'devise'
gem 'carrierwave'
gem 'mini_magick' # require with Ckeditor gem
gem 'will_paginate', '~> 3.0'
gem "cancan"
gem 'rmagick'
gem "nested_form"
gem "stripe"
gem 'bootstrap-x-editable-rails'
gem 'tinymce-rails'
gem 'devise_security_extension'
gem 'tinymce-rails-imageupload', '~> 4.0.0.beta'
# Use ActiveModel has_secure_password
gem 'bcrypt-ruby', '~> 3.0.0'
gem 'byebug'
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

# Use unicorn as the app server
# gem 'unicorn'
 gem 'whenever', :require => false

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

# Use debugger
# gem 'debugger', group: [:development, :test]

# sms sender gem
gem 'twilio-ruby', '~> 3.12'
gem 'rails_refactor', '~> 1.3'
gem 'coupon_code', '~> 0.0.1'
gem 'goog_currency'
gem 'bcrypt', '~> 3.1.7'
gem "ckeditor"

gem 'omniauth-facebook'
gem 'rollbar'

错误是

DEPRECATION WARNING: Accessing mime types via constants is deprecated. Please ch
ange `Mime::JSON` to `Mime[:json]`. (called from <top (required)> at D:/pinki/Ca
rPartSnigeria/CarPartSnigeria_12_12/trunk/config/application.rb:6)
D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.0.6/li
b/active_support/dependencies.rb:293:in `require': 126: The specified module cou
ld not be found.   - D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/r
magick-2.16.0/lib/RMagick2.so (LoadError)
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesup
port-5.0.6/lib/active_support/dependencies.rb:293:in `block in require'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesup
port-5.0.6/lib/active_support/dependencies.rb:259:in `load_dependency'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesup
port-5.0.6/lib/active_support/dependencies.rb:293:in `require'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rmagick-2
.16.0/lib/rmagick_internal.rb:12:in `<top (required)>'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesup
port-5.0.6/lib/active_support/dependencies.rb:293:in `require'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesup
port-5.0.6/lib/active_support/dependencies.rb:293:in `block in require'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesup
port-5.0.6/lib/active_support/dependencies.rb:259:in `load_dependency'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesup
port-5.0.6/lib/active_support/dependencies.rb:293:in `require'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rmagick-2
.16.0/lib/rmagick.rb:1:in `<top (required)>'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1
.16.0/lib/bundler/runtime.rb:81:in `require'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1
.16.0/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1
.16.0/lib/bundler/runtime.rb:76:in `each'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1
.16.0/lib/bundler/runtime.rb:76:in `block in require'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1
.16.0/lib/bundler/runtime.rb:65:in `each'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1
.16.0/lib/bundler/runtime.rb:65:in `require'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1
.16.0/lib/bundler.rb:114:in `require'
        from D:/pinki/CarPartSnigeria/CarPartSnigeria_12_12/trunk/config/applica
tion.rb:6:in `<top (required)>'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-
5.0.6/lib/rails/commands/commands_tasks.rb:88:in `require'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-
5.0.6/lib/rails/commands/commands_tasks.rb:88:in `block in server'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-
5.0.6/lib/rails/commands/commands_tasks.rb:85:in `tap'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-
5.0.6/lib/rails/commands/commands_tasks.rb:85:in `server'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-
5.0.6/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
        from D:/pinki/ProgramFiles/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-
5.0.6/lib/rails/commands.rb:18:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

1 个答案:

答案 0 :(得分:0)

RMagick安装非常烦人,因为它需要ImageMagick的系统二进制文件。

具体来说,是ImageMagick的稍微旧版本。截至2018年1月,最迟的6.9.1,不再存在于ImageMagick网站上。旧版本有点难以找到,特别是对于Windows而言,这是一个ftp存档:http://ftp.icm.edu.pl/packages/ImageMagick/binaries/

安装了正确版本的ImageMagick后,请确保已配置PATH设置。 Windows安装过程的最新RMagick指南位于:https://github.com/rmagick/rmagick/wiki/Installing-on-Windows