我是JRuby的新手,我试图让我的测试套件正确运行。我正在使用minitest,它看起来像minitest需要启用ObjectSpace。我已经试过每个以下命令:JRuby + minitest由于ObjectSpace而失败
bundle exec jruby -X+O -S rake
jruby -X+O -S bundle exec rake
JRUBY_OPTS="-X+O" bundle exec rake
export JRUBY_OPTS="-X+O" && bundle exec rake
,他们都导致以下堆栈跟踪:
RuntimeError: ObjectSpace is disabled; each_object will only work with Class, pass -X+O to enable
each_object at org/jruby/RubyObjectSpace.java:167
each at org/jruby/RubyEnumerator.java:189
to_a at org/jruby/RubyEnumerable.java:375
AWS at /Users/kshipley/.rvm/gems/[email protected]/bundler/gems/papi-38fc7d34a33d/lib/papi/aws.rb:1476
Papi at /Users/kshipley/.rvm/gems/[email protected]/bundler/gems/papi-38fc7d34a33d/lib/papi/aws.rb:6
(root) at /Users/kshipley/.rvm/gems/[email protected]/bundler/gems/papi-38fc7d34a33d/lib/papi/aws.rb:5
require at org/jruby/RubyKernel.java:1038
(root) at /Users/kshipley/.rvm/gems/[email protected]/bundler/gems/papi-38fc7d34a33d/lib/papi/aws.rb:157
require at org/jruby/RubyKernel.java:1038
require at /Users/kshipley/.rvm/gems/[email protected]/bundler/gems/papi-38fc7d34a33d/lib/papi.rb:68
each at org/jruby/RubyArray.java:1602
require at /Users/kshipley/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/runtime.rb:66
each at org/jruby/RubyArray.java:1602
require at /Users/kshipley/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/runtime.rb:55
require at /Users/kshipley/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler.rb:120
(root) at /Users/kshipley/work/src/split/config/environment.rb:5
require at org/jruby/RubyKernel.java:1038
(root) at /Users/kshipley/work/src/split/config/environment.rb:3
require at org/jruby/RubyKernel.java:1038
(root) at /Users/kshipley/work/src/split/test/test_helper.rb:1
load at org/jruby/RubyKernel.java:1063
__file__ at /Users/kshipley/.rvm/gems/[email protected]/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
each at org/jruby/RubyArray.java:1602
(root) at /Users/kshipley/.rvm/gems/[email protected]/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
rake aborted!
任何想法正确的命令是重新启用的对象空间中运行时耙?我有运行命令,如
bundle exec jruby -X+O test/functional/my_test.rb
bundle exec jruby -X+O -S irb
没有问题,所以它似乎有点特别与耙具有关。
'bundle exec jruby -X + O -S rake'怎么样? –
对不起,我编辑并发您的评论 - 这是我实际运行的命令。 – Kyle