尝试在nginx + thin下的rails框架上运行ruby,目前在WEBrick下工作。
我没有root访问权限,因为它托管在网络托管服务上。
到目前为止,宝石的所有问题都解决了无根访问。
thin需要eventmachine,所以:
$ gem install eventmachine
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby18 extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... yes
checking for rb_thread_blocking_region()... no
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for rb_thread_check_ints()... no
checking for rb_time_new()... yes
checking for sys/event.h... yes
checking for sys/queue.h... yes
creating Makefile
make
<cutted non-informative output>
make install
/usr/bin/install -c -o root -g wheel -m 0755 rubyeventmachine.so /www/<hostname>/.gems/gems/eventmachine-0.12.10/lib
install: /www/<hostname>/.gems/gems/eventmachine-0.12.10/lib/rubyeventmachine.so: chown/chgrp: Operation not permitted
*** Error code 71
Stop in /www/<hostname>/.gems/gems/eventmachine-0.12.10/ext.
Gem files will remain installed in /www/<hostname>/.gems/gems/eventmachine-0.12.10 for inspection.
Results logged to /www/<hostname>/.gems/gems/eventmachine-0.12.10/ext/gem_make.out
ruby和已安装宝石的版本:
$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-freebsd8]
$ gem list
activesupport (3.0.9)
backports (2.2.1)
bin (0.6.3)
bson (1.3.1)
i18n (0.4.2)
mongo (1.0.9)
rack (1.1.1)
rake (0.8.7)
rake-compiler (0.7.9)
ruby-augeas (0.3.0)
rubygems-update (1.8.5)
sources (0.0.2)
specific_install (0.2.3)
yard (0.7.2)
我没想到,ERROR: Failed to build gem native extension.
或make install ***Error code 71
中存在问题。
尝试$ gem install thin
答案 0 :(得分:1)
错误为ERROR: Failed to build gem native extension.
。通常这意味着系统中缺少某些东西。 Ruby开发库或gem的依赖项。在这种特殊情况下,我认为libevent(它是eventmachine的依赖)不在你的系统中。
您将找到有关错误的完整描述:
/www/<hostname>/.gems/gems/eventmachine-0.12.10/ext/gem_make.out
答案 1 :(得分:0)
感谢您的建议,Pablo!
不幸的是,gem_make.out只包含我提供的信息,没有别的......
由于rubyforge bugtracker aboud freebsd,我意识到将此行添加到.bashrc可以解决问题
export RB_USER_INSTALL="$USER"
在source .bashrc
之后我成功安装了eventmachine和thin。