我用黄瓜设置了一个rails 2.3项目,它工作正常。现在我想运行 javascript 测试并使用 Akephalos 进行设置。现在有趣的事情。测试在我同事的机器上运行得很好。
我们正在使用 RVM + ruby 1.8.7 + gemsets + bundler。Gems 都已安装,但每当我在我的机器上启动特定功能时,如下所示:
bundle exec cucumber featues/myfeature.feature
它说:
LoadError: UNIXServer is required
(root) at file:/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/gems/jruby-jars-1.6.0/lib/jruby-stdlib-1.6.0.jar!/META-INF/jruby.home/lib/ruby/1.8/drb/unix.rb:5
require at org/jruby/RubyKernel.java:1037
auto_load at file:/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/gems/jruby-jars-1.6.0/lib/jruby-stdlib-1.6.0.jar!/META-INF/jruby.home/lib/ruby/1.8/drb/unix.rb:826
open_server at file:/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/gems/jruby-jars-1.6.0/lib/jruby-stdlib-1.6.0.jar!/META-INF/jruby.home/lib/ruby/1.8/drb/drb.rb:794
initialize at file:/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/gems/jruby-jars-1.6.0/lib/jruby-stdlib-1.6.0.jar!/META-INF/jruby.home/lib/ruby/1.8/drb/drb.rb:1377
start_service at file:/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/gems/jruby-jars-1.6.0/lib/jruby-stdlib-1.6.0.jar!/META-INF/jruby.home/lib/ruby/1.8/drb/drb.rb:1665
start! at /Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/gems/akephalos-0.2.4/lib/akephalos/server.rb:29
(root) at -e:1
我的机器是 2011 款 MacBook Pro i7 四核,带有雪豹、自制软件、rvm、ruby、rvm infp 说:
ruby-1.8.7-p334@betterplace:
system:
uname: "Darwin ChrisBookPro.local 10.7.3 Darwin Kernel Version 10.7.3: Sun Mar 6 13:37:56 PST 2011; root:xnu-1504.14.2~1/RELEASE_X86_64 x86_64"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
zsh: "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"
rvm:
version: "rvm 1.2.9 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]"
ruby:
interpreter: "ruby"
version: "1.8.7"
date: "2011-02-18"
platform: "i686-darwin10.7.3"
patchlevel: "2011-02-18 patchlevel 334"
full_version: "ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.7.3]"
homes:
gem: "/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace"
ruby: "/Users/christoph/.rvm/rubies/ruby-1.8.7-p334"
binaries:
ruby: "/Users/christoph/.rvm/rubies/ruby-1.8.7-p334/bin/ruby"
irb: "/Users/christoph/.rvm/rubies/ruby-1.8.7-p334/bin/irb"
gem: "/Users/christoph/.rvm/rubies/ruby-1.8.7-p334/bin/gem"
rake: "/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/bin/rake"
environment:
PATH: "/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/bin:/Users/christoph/.rvm/gems/ruby-1.8.7-p334@global/bin:/Users/christoph/.rvm/rubies/ruby-1.8.7-p334/bin:/Users/christoph/.rvm/bin::/Users/christoph/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/sbin:/opt/local/share/java/jruby/bin:/Developer/SDKs/android-sdk-mac_x86/tools"
GEM_HOME: "/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace"
GEM_PATH: "/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace:/Users/christoph/.rvm/gems/ruby-1.8.7-p334@global"
MY_RUBY_HOME: "/Users/christoph/.rvm/rubies/ruby-1.8.7-p334"
IRBRC: "/Users/christoph/.rvm/rubies/ruby-1.8.7-p334/.irbrc"
RUBYOPT: ""
gemset: "betterplace"
打开 jruby-jar 的包装显示:drb 已包含在内。手动要求工作。但我无法弄清楚,问题是什么。通过进一步调查,我能够弄清楚实际的 java 命令行是什么,它应该启动 akephalos 服务器:
java -Xmx128M -cp /Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/gems/jruby-jars-1.6.0/lib/jruby-core-1.6.0.jar:/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/gems/jruby-jars-1.6.0/lib/jruby-stdlib-1.6.0.jar org.jruby.Main -I vendor:/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/gems/akephalos-0.2.4/lib:/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/gems/akephalos-0.2.4/src -r akephalos/server -e 'Akephalos::Server.start!("/tmp/akephalos.1586.sock")'
错误保持不变:
LoadError: UNIXServer is required
(root) at file:/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/gems/jruby-jars-1.6.0/lib/jruby-stdlib-1.6.0.jar!/META-INF/jruby.home/lib/ruby/1.8/drb/unix.rb:5
require at org/jruby/RubyKernel.java:1037
auto_load at file:/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/gems/jruby-jars-1.6.0/lib/jruby-stdlib-1.6.0.jar!/META-INF/jruby.home/lib/ruby/1.8/drb/unix.rb:826
open_server at file:/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/gems/jruby-jars-1.6.0/lib/jruby-stdlib-1.6.0.jar!/META-INF/jruby.home/lib/ruby/1.8/drb/drb.rb:794
initialize at file:/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/gems/jruby-jars-1.6.0/lib/jruby-stdlib-1.6.0.jar!/META-INF/jruby.home/lib/ruby/1.8/drb/drb.rb:1377
start_service at file:/Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/gems/jruby-jars-1.6.0/lib/jruby-stdlib-1.6.0.jar!/META-INF/jruby.home/lib/ruby/1.8/drb/drb.rb:1665
start! at /Users/christoph/.rvm/gems/ruby-1.8.7-p334@betterplace/gems/akephalos-0.2.4/lib/akephalos/server.rb:29
(root) at -e:1
任何形式的帮助都将受到高度赞赏。
干杯,克里斯托夫