忘れないメモ
gem install rmagick
すると
$ gem install rmagick
WARNING: Error fetching data: too many connection resets (http://production.s3.rubygems.org/latest_specs.4.8.gz)
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/****/.rbenv/versions/1.9.3-p194/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.2. Can't find Magick-config in /Users/****/.rbenv/versions/1.9.3-p194/bin:/usr/local/Cellar/rbenv/0.3.0/libexec:/Users/****/.rbenv/shims:/usr/local/bin:/usr/local/share/npm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/MacGPG2/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
--without-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/****/.rbenv/versions/1.9.3-p194/bin/ruby
Gem files will remain installed in /Users/****/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rmagick-2.13.2 for inspection.
Results logged to /Users/****/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rmagick-2.13.2/ext/RMagick/gem_make.out
とエラーが出た。imagemagickを入れていなかったので
brew install imagemagick
で入れたは良いがまだgemが入らない。
brew link imagemagick
を実行すると
Linking /usr/local/Cellar/imagemagick/6.8.0-10... Warning: Could not link imagemagick. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/imagemagick/6.8.0-10/share/ImageMagick
/usr/local/share is not writable. You should change its permissions.
権限が変になっているらしいので
sudo chgrp -R admin /usr/local/share/
sudo chmod -R g+w /usr/local/share/
を実行してから再度brew link imagemagick
して最後にgem install rmagick
でDONE!