How to start JRuby in client mode with Bundler?

Hi all,

Sorry for the stupid question. But I was looking at the

And not sure how I can pass the options to jruby when using Bundler:

I tried: bundle exec rspec --client -J-d32 spec/

But it gives me:

OptionParser::InvalidOption: invalid option: --client
complete at
/Users/dnagir/.rvm/rubies/jruby-1.6.5/lib/ruby/1.9/optparse.rb:1459

What am I doing wrong?

Cheers,
Dima
http://www.ApproachE.com

Have you tried this:

jruby --client -J-d32 -S bundle exec rspec spec/

That might work, but I did have a problem last week with bundler,
because it starts a subprocess that won’t have those options.
Alternatively you can try

JRUBY_OPTS="–client -J-d32"

so that the options are inherited by the subprocess.

On 10/12/2011, at 2:29 AM, Joe K. wrote:

Have you tried this:

jruby --client -J-d32 -S bundle exec rspec spec/

It would be a bit hard to do that as the tools that execute (guard-rspec
for example) run bundle exec rspec and only allow adding params to the
end.

I honestly saying expected a bit better perf improvement :frowning:

Down from 29 seconds to 25.
Only ~4 seconds boost :frowning:

On Fri, Dec 9, 2011 at 8:14 AM, Dmytrii N. [email protected]
wrote:

JRUBY_OPTS=“–client -J-d32”

Yep. That does the job.
I already had --1.9 option there. And only work on 1 JRuby project. So that’s ok
to go this path for now.

FYI, if you’re using rvm to manage your rubies and gemsets you
can also include JRUBY_OPTS settings in your .rvmrc – e.g.,

export JRUBY_OPTS=’ --1.9’
rvm use jruby-1.6.5@example

FWIW,

Hassan S. ------------------------ [email protected]

twitter: @hassan

On 10/12/2011, at 3:21 AM, Hassan S. wrote:

export JRUBY_OPTS=’ --1.9’
rvm use jruby-1.6.5@example

Didn’t know that. Thanks.
But rvmrc only gets picked up when you cd into it (so won’t be there
when you split terminal window in iTerm2 for example).

On 10/12/2011, at 2:42 AM, Daniel L. wrote:

That might work, but I did have a problem last week with bundler, because it
starts a subprocess that won’t have those options. Alternatively you can try

JRUBY_OPTS="–client -J-d32"

Yep. That does the job.
I already had --1.9 option there. And only work on 1 JRuby project. So
that’s ok to go this path for now.