安装OS X Mavericks后出现RMagick错误 [英] RMagick error after installing OS X Mavericks

查看:93
本文介绍了安装OS X Mavericks后出现RMagick错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了RMagick,并在OS X Mountain Lion中完美运行.我刚刚安装了OS X Mavericks,当我尝试运行rails s时,出现此错误:

I had RMagick installed and working perfectly in OS X Mountain Lion. I just installed OS X Mavericks and when I try to run rails s, I get this error:

/.rvm/gems/ruby-2.0.0-p0@myapp/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:in `require': dlopen(/.rvm/gems/ruby-2.0.0-p0@myapp/gems/rmagick-2.13.2/lib/RMagick2.bundle, 9): Library not loaded: /usr/lib/libltdl.7.dylib (LoadError)
  Referenced from: /.rvm/gems/ruby-2.0.0-p0@myapp/gems/rmagick-2.13.2/lib/RMagick2.bundle
  Reason: image not found - /.rvm/gems/ruby-2.0.0-p0@myapp/gems/rmagick-2.13.2/lib/RMagick2.bundle
    from /.rvm/gems/ruby-2.0.0-p0@myapp/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:in `block in require'
    from /.rvm/gems/ruby-2.0.0-p0@myapp/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /.rvm/gems/ruby-2.0.0-p0@myapp/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:in `require'
    from /.rvm/gems/ruby-2.0.0-p0@myapp/gems/rmagick-2.13.2/lib/rmagick.rb:11:in `<top (required)>'
    from /.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.2/lib/bundler/runtime.rb:72:in `require'
    from /.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.2/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
    from /.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.2/lib/bundler/runtime.rb:70:in `each'
    from /.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.2/lib/bundler/runtime.rb:70:in `block in require'
    from /.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.2/lib/bundler/runtime.rb:59:in `each'
    from /.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.2/lib/bundler/runtime.rb:59:in `require'
    from /.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.2/lib/bundler.rb:132:in `require'
    from /myapp/config/application.rb:13:in `<top (required)>'
    from /.rvm/gems/ruby-2.0.0-p0@myapp/gems/railties-3.2.14/lib/rails/commands.rb:53:in `require'
    from /.rvm/gems/ruby-2.0.0-p0@myapp/gems/railties-3.2.14/lib/rails/commands.rb:53:in `block in <top (required)>'
    from /.rvm/gems/ruby-2.0.0-p0@myapp/gems/railties-3.2.14/lib/rails/commands.rb:50:in `tap'
    from /.rvm/gems/ruby-2.0.0-p0@myapp/gems/railties-3.2.14/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

这是我的Gemfile:

This is my Gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.14'

group :assets do
  gem 'sass-rails',   '>= 3.2.3'
  gem 'coffee-rails', '>= 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end

group   :development do
    gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'
    gem 'sextant'
  gem "quiet_assets", ">= 1.0.2"
  gem "better_errors", ">= 0.7.2"
  gem "binding_of_caller", ">= 0.7.1"    
    gem 'meta_request'
    gem 'execjs'
    gem 'therubyracer'  
  gem "letter_opener"
  gem 'bullet'   
  gem 'rack-mini-profiler'   
  gem 'mocha', require: false
end

group :test do
  gem "email_spec", ">= 1.4.0"
end

group :development, :test do
  gem "rspec-rails", ">= 2.12.2"
  gem "database_cleaner", ">= 1.0.0.RC1"  
end

gem "stripe"
gem "jquery-rails"
gem "thin", ">= 1.5.0"
gem "pg", ">= 0.15.0"
gem "font-awesome-rails"
gem "bootstrap-sass", ">= 2.3.1.0"
gem "bootstrap-wysihtml5-rails"
gem "sendgrid", ">= 1.0.1"
gem "devise", ">= 2.2.4"
gem "cancan", ">= 1.6.9"
gem "rolify", ">= 3.2.0"
gem "simple_form", ">= 2.1.0"
gem "newrelic_rpm"
gem "rmagick"
gem "mini_magick"
gem "carrierwave"
gem "fog"
gem "rails_admin"
gem "acts-as-taggable-on"
gem "friendly_id"

我已经运行了bundle install,并且一切正常:

I have run bundle install and everything works normally:

$ bundle install
Using rake (10.1.0) 
Using i18n (0.6.5) 
Using multi_json (1.8.2) 
Using activesupport (3.2.14) 
Using builder (3.0.4) 
Using activemodel (3.2.14) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.5) 
Using rack-cache (1.2) 
Using rack-test (0.6.2) 
Using hike (1.2.3) 
Using tilt (1.4.1) 
Using sprockets (2.2.2) 
Using actionpack (3.2.14) 
Using mime-types (1.25) 
Using polyglot (0.3.3) 
Using treetop (1.4.15) 
Using mail (2.5.4) 
Using actionmailer (3.2.14) 
Using arel (3.0.2) 
Using tzinfo (0.3.38) 
Using activerecord (3.2.14) 
Using activeresource (3.2.14) 
Using bundler (1.3.2) 
Using rack-ssl (1.3.3) 
Using json (1.8.1) 
Using rdoc (3.12.2) 
Using thor (0.18.1) 
Using railties (3.2.14) 
Using rails (3.2.14) 
Using acts-as-taggable-on (2.4.1) 
Using addressable (2.3.5) 
Using annotate (2.6.0.beta2) from git://github.com/ctran/annotate_models.git (at master) 
Using atomic (1.1.14) 
Using bcrypt-ruby (3.1.2) 
Using coderay (1.1.0) 
Using better_errors (1.0.1) 
Using debug_inspector (0.0.2) 
Using binding_of_caller (0.7.2) 
Using sass (3.2.12) 
Using bootstrap-sass (2.3.2.2) 
Using bootstrap-wysihtml5-rails (0.3.1.23) 
Using uniform_notifier (1.3.0) 
Using bullet (4.6.0) 
Using callsite (0.0.11) 
Using cancan (1.6.10) 
Using carrierwave (0.9.0) 
Using coffee-script-source (1.6.3) 
Using execjs (2.0.2) 
Using coffee-script (2.2.0) 
Using coffee-rails (3.2.2) 
Using daemons (1.1.9) 
Using database_cleaner (1.2.0) 
Using orm_adapter (0.4.0) 
Using thread_safe (0.1.3) 
Using warden (1.2.3) 
Using devise (3.1.1) 
Using diff-lcs (1.2.4) 
Using launchy (2.3.0) 
Using email_spec (1.5.0) 
Using eventmachine (1.0.3) 
Using excon (0.27.6) 
Using formatador (0.2.4) 
Using net-ssh (2.7.0) 
Using net-scp (1.1.2) 
Using mini_portile (0.5.1) 
Using nokogiri (1.6.0) 
Using ruby-hmac (0.4.0) 
Using unicode (0.4.4) 
Using fog (1.16.0) 
Using font-awesome-rails (3.2.1.3) 
Using friendly_id (4.0.10.1) 
Using haml (4.0.3) 
Using jquery-rails (3.0.4) 
Using jquery-ui-rails (3.0.1) 
Using kaminari (0.14.1) 
Using letter_opener (1.1.2) 
Using libv8 (3.16.14.3) 
Using rack-contrib (1.1.0) 
Using meta_request (0.2.8) 
Using metaclass (0.0.1) 
Using subexec (0.2.3) 
Using mini_magick (3.6.0) 
Using mocha (0.14.0) 
Using nested_form (0.3.2) 
Using newrelic_rpm (3.6.8.164) 
Using pg (0.17.0) 
Using quiet_assets (1.0.2) 
Using rack-mini-profiler (0.1.31) 
Using rack-pjax (0.7.0) 
Using remotipart (1.2.1) 
Using safe_yaml (0.9.7) 
Using sass-rails (3.2.6) 
Using rails_admin (0.4.9) 
Using ref (1.0.5) 
Using rest-client (1.6.7) 
Using rmagick (2.13.2) 
Using rolify (3.2.0) 
Using rspec-core (2.14.6) 
Using rspec-expectations (2.14.3) 
Using rspec-mocks (2.14.4) 
Using rspec-rails (2.14.0) 
Using sendgrid (1.2.0) 
Using sextant (0.2.4) 
Using simple_form (2.1.0) 
Using stripe (1.8.7) 
Using therubyracer (0.12.0) 
Using thin (1.5.1) 
Using uglifier (2.2.1) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

还尝试了bundle update rmagick:

$ bundle update rmagick
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.1.0) 
Using i18n (0.6.5) 
Using multi_json (1.8.2) 
Using activesupport (3.2.14) 
Using builder (3.0.4) 
Using activemodel (3.2.14) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.5) 
Using rack-cache (1.2) 
Using rack-test (0.6.2) 
Using hike (1.2.3) 
Using tilt (1.4.1) 
Using sprockets (2.2.2) 
Using actionpack (3.2.14) 
Using mime-types (1.25) 
Using polyglot (0.3.3) 
Using treetop (1.4.15) 
Using mail (2.5.4) 
Using actionmailer (3.2.14) 
Using arel (3.0.2) 
Using tzinfo (0.3.38) 
Using activerecord (3.2.14) 
Using activeresource (3.2.14) 
Using bundler (1.3.2) 
Using rack-ssl (1.3.3) 
Using json (1.8.1) 
Using rdoc (3.12.2) 
Using thor (0.18.1) 
Using railties (3.2.14) 
Using rails (3.2.14) 
Using acts-as-taggable-on (2.4.1) 
Using addressable (2.3.5) 
Using annotate (2.6.0.beta2) from git://github.com/ctran/annotate_models.git (at master) 
Using atomic (1.1.14) 
Using bcrypt-ruby (3.1.2) 
Using coderay (1.1.0) 
Using better_errors (1.0.1) 
Using debug_inspector (0.0.2) 
Using binding_of_caller (0.7.2) 
Using sass (3.2.12) 
Using bootstrap-sass (2.3.2.2) 
Using bootstrap-wysihtml5-rails (0.3.1.23) 
Using uniform_notifier (1.3.0) 
Using bullet (4.6.0) 
Using callsite (0.0.11) 
Using cancan (1.6.10) 
Using carrierwave (0.9.0) 
Using coffee-script-source (1.6.3) 
Using execjs (2.0.2) 
Using coffee-script (2.2.0) 
Using coffee-rails (3.2.2) 
Using daemons (1.1.9) 
Using database_cleaner (1.2.0) 
Using orm_adapter (0.4.0) 
Using thread_safe (0.1.3) 
Using warden (1.2.3) 
Using devise (3.1.1) 
Using diff-lcs (1.2.4) 
Using launchy (2.3.0) 
Using email_spec (1.5.0) 
Using eventmachine (1.0.3) 
Using excon (0.27.6) 
Using formatador (0.2.4) 
Using net-ssh (2.7.0) 
Using net-scp (1.1.2) 
Using mini_portile (0.5.1) 
Using nokogiri (1.6.0) 
Using ruby-hmac (0.4.0) 
Using unicode (0.4.4) 
Using fog (1.16.0) 
Using font-awesome-rails (3.2.1.3) 
Using friendly_id (4.0.10.1) 
Using haml (4.0.3) 
Using jquery-rails (3.0.4) 
Using jquery-ui-rails (3.0.1) 
Using kaminari (0.14.1) 
Using letter_opener (1.1.2) 
Using libv8 (3.16.14.3) 
Using rack-contrib (1.1.0) 
Using meta_request (0.2.8) 
Using metaclass (0.0.1) 
Using subexec (0.2.3) 
Using mini_magick (3.6.0) 
Using mocha (0.14.0) 
Using nested_form (0.3.2) 
Using newrelic_rpm (3.6.8.164) 
Using pg (0.17.0) 
Using quiet_assets (1.0.2) 
Using rack-mini-profiler (0.1.31) 
Using rack-pjax (0.7.0) 
Using remotipart (1.2.1) 
Using safe_yaml (0.9.7) 
Using sass-rails (3.2.6) 
Using rails_admin (0.4.9) 
Using ref (1.0.5) 
Using rest-client (1.6.7) 
Using rmagick (2.13.2) 
Using rolify (3.2.0) 
Using rspec-core (2.14.6) 
Using rspec-expectations (2.14.3) 
Using rspec-mocks (2.14.4) 
Using rspec-rails (2.14.0) 
Using sendgrid (1.2.0) 
Using sextant (0.2.4) 
Using simple_form (2.1.0) 
Using stripe (1.8.7) 
Using therubyracer (0.12.0) 
Using thin (1.5.1) 
Using uglifier (2.2.1) 
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem is installed.

推荐答案

安装X代码5 ,然后执行以下操作:

Install X Code 5, then do this:

brew install libtool --universal
brew link libtool

这篇关于安装OS X Mavericks后出现RMagick错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆