我正在尝试在Synology diskstation上安装RoR。
uname -a
Linux Sonne 2.6.32.12#1922 Sun Sep 4 02:10:58 CST 2011 armv5tel GNU / Linux
通过ipkg安装ruby和rubygems
ruby -v
ruby 1.9.1p243(2009-07-16修订版24175)[arm-linux-eabi]
gem -v
1.8.11
安装了dev-tools。当我尝试运行sudo gem install rails
时,我在构建json原生扩展时遇到错误:
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/opt/bin/ruby extconf.rb
checking for re.h... *** 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
--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=/opt/bin/ruby
/opt/lib/ruby/1.9.1/mkmf.rb:362:in `try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /opt/lib/ruby/1.9.1/mkmf.rb:431:in `try_cpp'
from /opt/lib/ruby/1.9.1/mkmf.rb:809:in `block in have_header'
from /opt/lib/ruby/1.9.1/mkmf.rb:668:in `block in checking_for'
from /opt/lib/ruby/1.9.1/mkmf.rb:274:in `block (2 levels) in postpone'
from /opt/lib/ruby/1.9.1/mkmf.rb:248:in `open'
from /opt/lib/ruby/1.9.1/mkmf.rb:274:in `block in postpone'
from /opt/lib/ruby/1.9.1/mkmf.rb:248:in `open'
from /opt/lib/ruby/1.9.1/mkmf.rb:270:in `postpone'
from /opt/lib/ruby/1.9.1/mkmf.rb:667:in `checking_for'
from /opt/lib/ruby/1.9.1/mkmf.rb:808:in `have_header'
from extconf.rb:14:in `<main>'
Gem files will remain installed in /opt/lib/ruby/gems/1.9.1/gems/json-1.6.1 for inspection.
Results logged to /opt/lib/ruby/gems/1.9.1/gems/json-1.6.1/ext/json/ext/parser/gem_make.out
据我所知,所有必要的标题都在那里。我错过了什么?
答案 0 :(得分:1)
你不应该使用ruby 1.9.1和rails,如RoR网站所述:
我们建议使用Ruby 1.8.7或Ruby 1.9.2与Rails一起使用。 Ruby 1.8.6 不支持早期版本,版本1.9.1也不支持。