现有Ruby on Rails应用程序的Bundler错误?

时间:2021-07-05 12:13:03

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

我的开发环境,在云端(CLOUD9)。 Ruby版本 - 2.1.5 Rails版本 - 4.2.1

My Existing Application ruby version is 2.1.1 and rails 4.

我现有的应用程序ruby版本是2.1.1和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?

我该如何解决这个问题?

2 个解决方案

#1


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?

它试图更新图像魔法,但失败了。 ImageMagic是否正确安装,并且您使用的gem是否需要另一个版本而不是cloud9上安装的版本?

From their website, it's suggested to:

从他们的网站上,建议:

sudo apt-get install imagemagick

I suggest updating the imagemagic binary before bundling.

我建议在捆绑之前更新imagemagic二进制文件。

Hope this helps.

希望这可以帮助。

#2


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.

您还需要安装开发库。我现在无法访问ubunt机器,但运行它应该会抛出正确的软件包。

apt-cache search imagemagick | grep dev

apt-cache搜索imagemagick | grep dev

Look for something like imagemagick-dev at a guess

在猜测中寻找像imagemagick-dev之类的东西

On Fedora the package can be installed as follows

在Fedora上,可以按如下方式安装软件包

dnf install ImageMagick-devel

dnf安装ImageMagick-devel

#1


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?

它试图更新图像魔法,但失败了。 ImageMagic是否正确安装,并且您使用的gem是否需要另一个版本而不是cloud9上安装的版本?

From their website, it's suggested to:

从他们的网站上,建议:

sudo apt-get install imagemagick

I suggest updating the imagemagic binary before bundling.

我建议在捆绑之前更新imagemagic二进制文件。

Hope this helps.

希望这可以帮助。

#2


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.

您还需要安装开发库。我现在无法访问ubunt机器,但运行它应该会抛出正确的软件包。

apt-cache search imagemagick | grep dev

apt-cache搜索imagemagick | grep dev

Look for something like imagemagick-dev at a guess

在猜测中寻找像imagemagick-dev之类的东西

On Fedora the package can be installed as follows

在Fedora上,可以按如下方式安装软件包

dnf install ImageMagick-devel

dnf安装ImageMagick-devel