Reputation: 12869
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!
Upvotes: 3
Views: 2585
Reputation: 3122
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
Upvotes: 7
Reputation: 12869
Found it!
jruby -J-Xmx2048m -S /home/prats/.rvm/gems/jruby-1.6.1@myapp/bin/rake db:migrate
Upvotes: 4