Getting error while installing rmagick gem - ruby-on-rails

I am installing gem rmagick in Ubuntu 14.04 OS but I am getting error as,
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/home/jignesh/.rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150317-9073-18x8ncb.rb extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no
Can't install RMagick 2.13.4. Can't find MagickWand.h.
*** 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=/home/jignesh/.rvm/rubies/ruby-2.1.5/bin/ruby
extconf failed, exit code 1
I have tried so many solutions provided on Stackoverflow as well as on other sites but no one worked for me.
So please any one provide me solution.
Thanks in advance.

You should install magickwand package to fix this problem:
sudo apt-get install libmagickwand-dev

Related

Unable to install Unicorn on Windows

I am unable to install Unicorn on localhost (OS -- Windows 8).
>gem install unicorn
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing unicorn:
ERROR: Failed to build gem native extension.
E:/software/Ruby200-x64/bin/ruby.exe extconf.rb
checking for CLOCK_MONOTONIC in time.h... yes
checking for clockid_t in time.h... yes
checking for clock_gettime() in -lrt... no
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for poll() in poll.h... no
checking for getaddrinfo() in sys/types.h,sys/socket.h,netdb.h... no
getaddrinfo required
*** 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=E:/software/Ruby200-x64/bin/ruby
--with-rtlib
--without-rtlib
--with-nsllib
--without-nsllib
--with-socketlib
--without-socketlib
Gem files will remain installed in E:/software/Ruby200-x64/lib/ruby/gems/2.0.0/gems/kgio-2.9.2 for inspection.
Results logged to E:/software/Ruby200-x64/lib/ruby/gems/2.0.0/gems/kgio-2.9.2/ext/kgio/gem_make.out
Why? What am I doing wrong? How can I fix it?
I'm using Ruby on Rails 4.1.4 btw.
Thanks in advance.
Unicorn does not have native Windows support.

rmagick on OSX Mavericks - "Can't find Magick-config in ..."

When I try to install rmagick on OSX Mavericks, I get this error:
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/adam/.rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for /usr/bin/clang... yes
checking for Magick-config... no
Can't install RMagick 2.13.2. Can't find Magick-config in /opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/Users/adam/.rvm/gems/ruby-2.0.0-p353/bin:/Users/adam/.rvm/gems/ruby-2.0.0-p353#global/bin:/Users/adam/.rvm/rubies/ruby-2.0.0-p353/bin:/Users/adam/.rvm/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:#/usr/local/bin:/usr/local/mysql-5.6.13-osx10.7-x86_64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/ImageMagick/bin:/usr/local/mysql/bin:/usr/local/mysql/bin:/usr/local/mysql/bin:/usr/local/mysql/bin:/usr/local/mysql/bin:/usr/local/mysql/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/adam/.rvm/rubies/ruby-2.0.0-p353/bin/ruby
extconf failed, exit code 1
Gem files will remain installed in /Users/adam/.rvm/gems/ruby-2.0.0-p353/gems/rmagick-2.13.2 for inspection.
Results logged to /Users/adam/.rvm/gems/ruby-2.0.0-p353/extensions/x86_64-darwin-13/2.0.0/rmagick-2.13.2/gem_make.out
In ~/.bash_profile is following:
MYSQL=/usr/local/mysql/bin
export PATH=$PATH:$MYSQL
#export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
export PG_DUMP="/Applications/Postgres.app/Contents/MacOS/bin/"
#PATH=$PG_DUMP:$PATH
#export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
export PATH=/usr/local/bin:$PATH
There's no such a path as is in the error output, where does it comes from and how can I fix it?
Thank you.
Do you have ImageMagick installed? Install it via homebrew:
brew install imagemagick

extconf.rb failed (Ruby On Rails)

Im new to ruby and rails. I've set up ruby 2 on rails 4 successfully (On windows 7). I cloned a ruby on rails based git project (thingspeak - https://github.com/iobridge/thingspeak/blob/master/README.textile). Using the command line I went into the project directory and ran "bundle install". A few bundles got downloaded and installed and then I got the following error -
::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.
c:/row/Ruby200/bin/ruby.exe extconf.rb
checking for CLOCK_MONOTONIC in time.h... yes
checking for clockid_t in time.h... yes
checking for clock_gettime() in -lrt... no
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for poll() in poll.h... no
checking for getaddrinfo() in sys/types.h,sys/socket.h,netdb.h... no
getaddrinfo required
*** 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=c:/row/Ruby200/bin/ruby
--with-rtlib
--without-rtlib
--with-nsllib
--without-nsllib
--with-socketlib
--without-socketlib
Gem files will remain installed in c:/row/Ruby200/lib/ruby/gems/2.0.0/gems/kgio-
2.8.1 for inspection.
Results logged to c:/row/Ruby200/lib/ruby/gems/2.0.0/gems/kgio-2.8.1/ext/kgio/ge
m_make.out
An error occurred while installing kgio (2.8.1), and Bundler cannot continue.
Make sure that `gem install kgio -v '2.8.1'` succeeds before bundling.
Any ideas on what it means and how to fix it?
The kgio gem which fails to compile here does not work on Windows. It could work if you comment the respective line in the Gemfile but could fail in various other places.
Generally, the Rails app you want to install doesn't seem to be tested on Windows at all, so you might instead want to use a better supported OS to install it. The README mentions Ubuntu here.

gem install ruby-odbc -v '0.99995' Not able install on ubuntu 11.10

I am not getting error while installing gem ruby-odbc -v'0.99995'.
Please help me to solve this error. I try lot of things but it didn't worked.
Building native extensions. This could take a while...
ERROR: Error installing ruby-odbc:
ERROR: Failed to build gem native extension.
/home/sheetal/.rvm/rubies/ruby-1.8.7-p371/bin/ruby extconf.rb
checking for version.h... yes
checking for sql.h... no
*** 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=/home/sheetal/.rvm/rubies/ruby-1.8.7-p371/bin/ruby
--with-odbc-dir
--without-odbc-dir
--with-odbc-include
--without-odbc-include=${odbc-dir}/include
--with-odbc-lib
--without-odbc-lib=${odbc-dir}/lib
ERROR: sql.h not found
I am using ruby 1.8.7 & rails2
Have you tried installing the unix odbc development files?
sudo apt-get install unixodbc-dev
If you're on OS X and having this issue try
brew install unixodbc
Then you should be able to
gem install ruby-odbc

Rmagick and carrierwave installment in dreamhost vps

I am trying to install carrierwave not on my machine but on a vps hosted on dreamhost.
Here the Gemfile
gem "rmagick"
gem 'carrierwave'
Here the error when bundling:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/wywvps/.rvm/rubies/ruby-1.9.3-p327/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config.
checking for gcc... yes
checking for Magick-config... yes
Warning: Found more than one ImageMagick installation. This could cause problems at runtime.
/usr/bin/Magick-config reports version 6.6.0 Q16 is installed in /usr
/usr/bin/X11/Magick-config reports version 6.6.0 Q16 is installed in /usr
Using 6.6.0 Q16 from /usr.
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no
Can't install RMagick 2.13.1. Can't find MagickWand.h.
*** 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=/home/wywvps/.rvm/rubies/ruby-1.9.3-p327/bin/ruby
Gem files will remain installed in /home/wywvps/.rvm/gems/ruby-1.9.3-p327/gems/rmagick-2.13.1 for inspection.
Results logged to /home/wywvps/.rvm/gems/ruby-1.9.3-p327/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
An error occurred while installing rmagick (2.13.1), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling.
try installing
sudo apt-get install libmagickwand-dev imagemagick
It says that you do not have "MagickWand.h" file in the wand folder.
Please check that in your installation folder of your ImageMagick is this file located.
Petr

Resources