尝试在nginx + thin下的rails框架上运行ruby,目前在WEBrick下工作。Thin/eventmachine非root安装问题
我没有root访问权限,因此它被托管在虚拟主机服务。
直到现在,所有的gem问题都解决不了根访问权限。
薄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 -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