(Edition: voir en bas pour la solution) Je suis en train de réaliser un projet Ruby On Rails et j'essaie d'installer la gemme RMagick. En utilisant OS X 10.6, Ruby version 2.0.0p247, Rails 4.0.0, RVM 1.22.12.Ruby on Rails Problème d'installation de RMagick gem
Quand je lance un paquet installation je reçois l'erreur suivante:
...
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.
Alors je tente la suggestion:
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
Alors je tente 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/[email protected]/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/[email protected]/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
J'apprécierais beaucoup toute aide. J'ai regardé des questions similaires sur ce site, mais aucune des suggestions ont aidé. Dois-je installer d'autres paquets avant d'installer RMagick ou autre chose?
Edit: solution
J'ai simplement utilisé homebrew installer ImageMagick brew install imagemagick
puis sudo gem install rmagick
et maintenant bundle install
fonctionne bien!
Les suggestions de cette question ne fonctionnent pas? http://stackoverflow.com/q/3704919/1004046 – Pigueiras
Installez 'ImageMagic' en premier. Howto: http://www.imagemagick.org/script/binary-releases.php#macosx –
@YevgeniyAnfilofyev J'essaie cela maintenant et j'ai suivi les instructions sur cette page, mais quand j'essaie de lancer 'convertir logo: logo .gif' il me dit "Instruction illégale" et "bundle install' jette la même erreur. La méthode que vous avez liée fonctionnera-t-elle avec Snow Leopard 10.6 même si elle dit Mountain Lion dans la description? EDIT: selon [ceci] (http://stackoverflow.com/questions/2503172/imagemagick-on-mac-osx-snow-leopard-is-there-any-way-to-get-it-to-compile- et -r) le binaire est Lion-seulement :( –