Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jruby pass jvm arguments to rake task

Tags:

jvm

rake

jruby

How do i pass jvm arguments like Xmx to a rake task in jruby? Am using rvm and running the rake task "rake db:migrate".

Thanks!

like image 794
Pratik Khadloya Avatar asked Mar 03 '26 03:03

Pratik Khadloya


1 Answers

Rather that put the entire path, if jruby is already the Ruby you're using (for example, with rvm) such that just typing rake would be using jruby, you can use a double dash to send the arguments to the jvm.

Examples:

bundle exec rake -- -J-Xmx1024m (if you're using bundler)

rake -- -J-Xmx1024m

like image 92
Sammy Larbi Avatar answered Mar 04 '26 20:03

Sammy Larbi