7

(編集: 解決策については下部を参照してください) Ruby On Rails プロジェクトを作成しており、RMagick gem をインストールしようとしています。OS X 10.6、Ruby バージョン 2.0.0p247、Rails 4.0.0、RVM 1.22.12 を使用。

バンドル インストールを実行すると、次のエラーが表示されます。

...
Installing rmagick (2.13.2) 
Errno::EACCES: Permission denied - /Users/jasonpather/.rvm/gems/ruby-2.0.0-p247/g
ems/rmagick-2.13.2/build_tarball.rake
An error occurred while installing rmagick (2.13.2), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.2'` succeeds before bundling.

それで、私は提案を試みます:

Jason-Pathers-MacBook-Pro:BuyABrick jasonpather$ gem install rmagick -v '2.13.2'
ERROR:  While executing gem ... (Errno::EACCES)
Permission denied - /Users/jasonpather/.rvm/gems/ruby-2.0.0-p247/gems/rmagick
-2.13.2/build_tarball.rake

それで、私はsudoを試します:

Jason-Pathers-MacBook-Pro:BuyABrick jasonpather$ sudo gem install rmagick -v '2.1
3.2'
Password:
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
    ERROR: Failed to build gem native extension.

/Users/jasonpather/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc-4.2... yes
checking for Magick-config... no
Can't install RMagick 2.13.2. Can't find Magick-config in /Users/jasonpather/.rvm
/gems/ruby-2.0.0-p247/bin:/Users/jasonpather/.rvm/gems/ruby-2.0.0-p247@global/bin
:/Users/jasonpather/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/jasonpather/.rvm/gems/
ruby-2.0.0-p247/bin:/Users/jasonpather/.rvm/gems/ruby-2.0.0-p247@global/bin:/User
s/jasonpather/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/jasonpather/.rvm/bin:/opt/lo
cal/bin:/opt/local/sbin:/opt/local/lib/postgresql83/bin/:/usr/local/bin:/usr/bin:
/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/texbin:/usr/X11/bin

*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/jasonpather/.rvm/rubies/ruby-2.0.0-p247/bin/ruby


Gem files will remain installed in /Users/jasonpather/.rvm/gems/ruby-2.0.0-p247/g
ems/rmagick-2.13.2 for inspection.
Results logged to /Users/jasonpather/.rvm/gems/ruby-2.0.0-p247/gems/rmagick-2.13.
2/ext/RMagick/gem_make.out

助けていただければ幸いです。このサイトで同様の質問を見てきましたが、どの提案も役に立ちませんでした。RMagick などをインストールする前に、他のパッケージをインストールする必要がありますか?

編集:ソリューション

自作を使用してimagemagickをインストールしただけbrew install imagemagickで、正常に動作するようにsudo gem install rmagickなりましたbundle install!

4

1 に答える 1