Centos 6.5上的Atomic Gem?

时间:2014-02-11 14:58:46

标签: ruby gem bundler atomic centos6

几个月前我遇到了一个问题并以某种方式修复了它。从那时起,某个网站托管公司在我的服务器上进行了强制升级,这几乎打破了一切。这是最后一件需要纠正的部分,我无法自己解决这个问题。

我有一个Rails 4项目,它依赖于Atomic gem 1.1.14版。这在OSX Mavericks本地和登台服务器(我认为是Centos 5.6)上运行良好,但不能在生产服务器上运行。

  • Centos 6.5
  • 64
  • Ruby 1.9.3
  • Rubygems 2.2.2
  • gcc 4.8.2

我安装了最新的gcc,因为我发现一个论坛帖子说它应该可以使用,但没有骰子。

在服务器上,运行gem install atomic -v 1.1.14可能有效,但随后通过Capistrano部署,运行bundle install失败时出现以下错误:

* 2014-02-11 09:51:08 executing `bundle:install'
* executing "cd /var/www/vhosts/example.com/subdomains/subdomain/releases/20140211145013 && bundle install --gemfile /var/www/vhosts/example.com/subdomains/subdomain/releases/20140211145013/Gemfile --path /var/www/vhosts/example.com/subdomains/subdomain/shared/bundle --deployment --quiet --without development test"
servers: ["subdomain.example.com"]
[subdomain.example.com] executing command
** [out :: subdomain.example.com] Your Gemfile lists the gem database_cleaner (>= 0) more than once.
** [out :: subdomain.example.com] You should probably keep only one of them.
** [out :: subdomain.example.com] While it's not a problem now, it could cause errors if you change the version of just one of them later.
** [out :: subdomain.example.com] Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
** [out :: subdomain.example.com] 
** [out :: subdomain.example.com] /usr/local/bin/ruby extconf.rb --with-cflags=-march=i686
** [out :: subdomain.example.com] *** extconf.rb failed ***
** [out :: subdomain.example.com] Could not create Makefile due to some reason, probably lack of
** [out :: subdomain.example.com] necessary libraries and/or headers.  Check the mkmf.log file for more
** [out :: subdomain.example.com] details.  You may need configuration options.
** [out :: subdomain.example.com] 
** [out :: subdomain.example.com] Provided configuration options:
** [out :: subdomain.example.com] --with-opt-dir
** [out :: subdomain.example.com] --without-opt-dir
** [out :: subdomain.example.com] --with-opt-include
** [out :: subdomain.example.com] --without-opt-include=${opt-dir}/include
** [out :: subdomain.example.com] --with-opt-lib
** [out :: subdomain.example.com] --without-opt-lib=${opt-dir}/lib
** [out :: subdomain.example.com] --with-make-prog
** [out :: subdomain.example.com] --without-make-prog
** [out :: subdomain.example.com] --srcdir=.
** [out :: subdomain.example.com] --curdir
** [out :: subdomain.example.com] --ruby=/usr/local/bin/ruby
** [out :: subdomain.example.com] --with-atomic_reference-dir
** [out :: subdomain.example.com] --without-atomic_reference-dir
** [out :: subdomain.example.com] --with-atomic_reference-include
** [out :: subdomain.example.com] --without-atomic_reference-include=${atomic_reference-dir}/include
** [out :: subdomain.example.com] --with-atomic_reference-lib
** [out :: subdomain.example.com] --without-atomic_reference-lib=${atomic_reference-dir}/lib
** [out :: subdomain.example.com] /usr/local/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
** [out :: subdomain.example.com] You have to install development tools first.
** [out :: subdomain.example.com] from /usr/local/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0'
** [out :: subdomain.example.com] from /usr/local/lib/ruby/1.9.1/mkmf.rb:712:in `try_run'
** [out :: subdomain.example.com] from extconf.rb:26:in `<main>'
** [out :: subdomain.example.com] 
** [out :: subdomain.example.com] extconf failed, exit code 1
** [out :: subdomain.example.com] 
** [out :: subdomain.example.com] Gem files will remain installed in /var/www/vhosts/example.com/subdomains/subdomain/shared/bundle/ruby/1.9.1/gems/atomic-1.1.14 for inspection.
** [out :: subdomain.example.com] Results logged to /var/www/vhosts/example.com/subdomains/subdomain/shared/bundle/ruby/1.9.1/extensions/x86_64-linux/1.9.1-static/atomic-1.1.14/gem_make.out
** [out :: subdomain.example.com] An error occurred while installing atomic (1.1.14), and Bundler cannot continue.
** [out :: subdomain.example.com] Make sure that `gem install atomic -v '1.1.14'` succeeds before bundling.
command finished in 6952ms
*** [deploy:update_code] rolling back

真正令我困惑的部分是它正在使用这个标志,如果我理解正确--with-cflags=-march=i686这是一个32位的东西,不是吗?

如果有人知道这方面的解决办法,或者可以给我一点方向,我会非常感激。

0 个答案:

没有答案