Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6183405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:21:35+00:00 2026-05-24T01:21:35+00:00

I am new to JRuby, and I’m trying to get my test suite running

  • 0

I am new to JRuby, and I’m trying to get my test suite running correctly. I’m using minitest, and it looks like minitest requires the ObjectSpace to be enabled. I’ve tried each of the following commands:

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

and all of them result in the following stack trace:

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/jruby-1.6.2@split/bundler/gems/papi-38fc7d34a33d/lib/papi/aws.rb:1476
     Papi at /Users/kshipley/.rvm/gems/jruby-1.6.2@split/bundler/gems/papi-38fc7d34a33d/lib/papi/aws.rb:6
   (root) at /Users/kshipley/.rvm/gems/jruby-1.6.2@split/bundler/gems/papi-38fc7d34a33d/lib/papi/aws.rb:5
  require at org/jruby/RubyKernel.java:1038
   (root) at /Users/kshipley/.rvm/gems/jruby-1.6.2@split/bundler/gems/papi-38fc7d34a33d/lib/papi/aws.rb:157
  require at org/jruby/RubyKernel.java:1038
  require at /Users/kshipley/.rvm/gems/jruby-1.6.2@split/bundler/gems/papi-38fc7d34a33d/lib/papi.rb:68
     each at org/jruby/RubyArray.java:1602
  require at /Users/kshipley/.rvm/gems/jruby-1.6.2@global/gems/bundler-1.0.15/lib/bundler/runtime.rb:66
     each at org/jruby/RubyArray.java:1602
  require at /Users/kshipley/.rvm/gems/jruby-1.6.2@global/gems/bundler-1.0.15/lib/bundler/runtime.rb:55
  require at /Users/kshipley/.rvm/gems/jruby-1.6.2@global/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/jruby-1.6.2@split/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/jruby-1.6.2@split/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
rake aborted!

Any ideas what the proper command is to re-enable the ObjectSpace when running rake? I have run commands like

bundle exec jruby -X+O test/functional/my_test.rb
bundle exec jruby -X+O -S irb

with no issues, so it seems somehow related to rake specifically.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:21:35+00:00Added an answer on May 24, 2026 at 1:21 am

    Does your rake task spawn subprocesses? If so, JRuby might be reusing the current JVM process. Try exporting JRUBY_OPTS='-X+O -J-Djruby.launch.inproc=false'.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started using JRuby and I create a small test file: require 'java'
I'm trying to write a script that is executed with the jruby-complete.jar like so:
Ola Bini , one of the big guys behind JRuby, is developing a new
New to javascript/jquery and having a hard time with using this or $(this) to
New to silverlight. Traditionally if I were to design a wizard-like process where a
New to Linux programming in general. I am trying to communicate with a kernel
I'm creating a new plugin for a jruby on rails application that will eventually
I am new to Ruby on Rails. I am using Netbeans IDE. While importing
Hi I am using JRuby to interact with a Java class. I have successfully
I have a jruby/rails app using: jruby 1.4.0 Rails 2.3.5 ActiveMQ 5.3.0 Mule ESB

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.