简体   繁体   中英

ruby on rails rmagick can't use, cloud9

I am using cloud9.

I want to use gem 'rmagick', but using bundle, following error message occurs...

please help...

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /usr/local/rvm/gems/ruby-2.4.0/gems/rmagick-2.16.0/ext/RMagick /usr/local/rvm/rubies/ruby-2.4.0/bin/ruby -r ./siteconf20180204-XXXXXX-oyXXpq.rb extconf.rb checking for gcc... yes checking for Magick-config... no checking for pkg-config... yes Package MagickCore was not found in the pkg-config search path. Perhaps you should add the directory containing `MagickCore.pc' to the PKG_CONFIG_PATH environment variable No package 'MagickCore' found checking for outdated ImageMagick version (<= 6.4.9)... * 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.

I just spun up a Cloud9 VM and tried it.

My Cloud9 VM I tried used yum as a package manager. Meaning I installed ImageMagick via sudo yum install ImageMagick-devel ... when I did that my gem install rmagick worked.

Didn't try it with Bundler, but if gem install works then it should work in Bundler also.

Using the command prompt install/update imagemagick via

sudo apt-get update

Then

sudo apt-get install imagemagick

See more

Hope it helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM