This Question is Answered

1 "helpful" answer available (2 pts)
4 Replies Last post: Feb 29, 2012 7:46 PM by Paul Krause  
Paul Krause Newbie 3 posts since
2012-2-28
Currently Being Moderated

Feb 28, 2012 12:53 AM

I think I need help to install the Rmagick gem in a RubyMine project

Apologies if this is a silly question but I have only recently started using RubyMine.

I have ImageMagick successfully installed using MacPorts and can Bundle Install Rmagick from the command line with no problem.

However, I am now building a project in RubyMine 3.2.4 (on OS X Lion).

When I try to bundle install the RMagick gem from RubyMine I get the messages below in the console.

ImageMagic is installed in /opt/local/lib/

 

Any help gratefully received!

Paul K.

 

Installing rmagick (2.13.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
        /Users/Paul_Krause/.rvm/rubies/ruby-1.9.2-p290/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.1. Can't find Magick-config in /Users/Paul_Krause/.rvm/rubies/ruby-1.9.2-p290/bin:/Users/Paul_Krause/.rvm/gems/ruby-1.9.2-p290/bin:/Users/Paul_Krause/.rvm/gems/ruby-1.9.2-p290@global/bin:/Users/Paul_Krause/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin
*** 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/Paul_Krause/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
Gem files will remain installed in /Users/Paul_Krause/.rvm/gems/ruby-1.9.2-p290/gems/rmagick-2.13.1 for inspection.
Results logged to /Users/Paul_Krause/.rvm/gems/ruby-1.9.2-p290/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
An error occured while installing rmagick (2.13.1), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling.
Process finished with exit code 5

Dennis Ushakov JetBrains 397 posts since
2008-9-10
Currently Being Moderated
Feb 28, 2012 2:08 PM in response to: Paul Krause
Re: I think I need help to install the Rmagick gem in a RubyMine project

Hello Paul,

 

it happens due to the way Mac OS X works with environment variables (such as Path). Please see http://devnet.jetbrains.net/docs/DOC-1160 on how to setup environment variables to be picked up by RubyMine

Dennis Ushakov JetBrains 397 posts since
2008-9-10
Currently Being Moderated
Feb 29, 2012 5:13 PM in response to: Paul Krause
Re: I think I need help to install the Rmagick gem in a RubyMine project

Paul,

 

Environment Variables preference pane doesn't understand variables substitution (like $PATH), you need to specify full value manually, like

/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

 

Most likely that should fix the problem

More Like This

  • Retrieving data ...