简体   繁体   中英

Bundler Error for Existing Ruby on Rails Application?

My development environment, in the cloud(CLOUD9). Ruby Version - 2.1.5 Rails Version - 4.2.1

My Existing Application ruby version is 2.1.1 and rails 4.

When i am given bundle install it showing the error like

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

    /usr/local/rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150506-16709-1tpek9a.rb extconf.rb  

checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
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.

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=/usr/local/rvm/rubies/ruby-2.1.5/bin/ruby

extconf.rb:79:in ``': No such file or directory - convert (Errno::ENOENT)
        from extconf.rb:79:in `block in configure_compile_options'
        from /usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
        from /usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
        from /usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:321:in `open'
        from /usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
        from /usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:321:in `open'
        from /usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
        from /usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
        from extconf.rb:76:in `configure_compile_options'
        from extconf.rb:15:in `initialize'
        from extconf.rb:474:in `new'
        from extconf.rb:474:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/rmagick-2.15.0 for inspection.
Results logged to /usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/gems/2.1.0/extensions/x86_64-linux/2.1.0/rmagick-2.15.0/gem_make.out    

How Can i Solve this?

I would take a look at this line:

checking for outdated ImageMagick version (<= 6.4.9)... *** extconf.rb failed ***

and

extconf.rb:79:in ``': No such file or directory - convert (Errno::ENOENT)

It tries to update image magic, which fails. Is ImageMagic installed properly, and are you using a gem that requires another version than the one installed on cloud9?

From their website , it's suggested to:

sudo apt-get install imagemagick

I suggest updating the imagemagic binary before bundling.

Hope this helps.

You will also need to install the development libraries. I don't have access to an ubunt machine now but running this should throw up the correct package.

apt-cache search imagemagick | grep dev

Look for something like imagemagick-dev at a guess

On Fedora the package can be installed as follows

dnf install ImageMagick-devel

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