我已经在 centos 6.3 上使用 rvm 安装了 ruby 1.9.3p327 和 rails 3.2.8。但是在为特定项目文件夹进行捆绑安装时,该过程在尝试安装 gem unf_ext 0.0.5 并引发以下错误之间失败,
使用原生扩展安装 unf_ext (0.0.5) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension。
/home/rradmin/.rvm/rubies/ruby-1.9.3-p327/bin/ruby extconf.rb -fPIC
checking for main() in -lstdc++... yes
checking for ruby/encoding.h... yes
creating Makefile
make
compiling unf.cc
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/vector:61,
from unf/normalizer.hh:4,
from unf.cc:1:
.....
....
...
Gem 文件将继续安装在 /home/rradmin/.rvm/gems/ruby-1.9.3-p327@r32/gems/unf_ext-0.0.5 以供检查。结果记录到 /home/rradmin/.rvm/gems/ruby-1.9.3-p327@r32/gems/unf_ext-0.0.5/ext/unf_ext/gem_make.out
安装 unf_ext (0.0.5) 时出错,Bundler 无法继续。
gem install unf_ext -v '0.0.5'
在捆绑之前确保成功。
如上所述,我还尝试单独安装 unf_ext,但遇到了同样的错误。我已经提到了https://github.com/cowboyd/therubyracer/issues/135,但仍然无法解决问题。请让我知道解决此问题的正确方法。
谢谢你。