1

I currently run my Rails app using:

jruby --1.9 -J-XX:+CMSClassUnloadingEnabled -J-XX:+UseConcMarkSweepGC -J-XX:MaxPermSize=256m -S rails server

This is getting pretty old now. How can I set my Rails project up so that just running

rails server

has the same effect?

(Note: bash aliases and the like are not what I'm looking for here. I want to make the project work right, not fix my local settings)

Paul Biggar
  • 27,579
  • 21
  • 99
  • 152
  • Hmm, I've found PROJECT_JRUBY_OPTS in my .rvmrc which looks like it should solve this. However, it doesnt seem to work. Even more puzzlingly, setting JRUBY_OPTS via an export won't stick, which implies that RVM is doing something weird. – Paul Biggar Nov 27 '11 at 02:25
  • Asked about that: http://stackoverflow.com/questions/8283300/how-do-i-use-jruby-opts-with-rvm – Paul Biggar Nov 27 '11 at 03:01

1 Answers1

2

When using RVM and a project .rvmrc, the canonical way is to set PROJECT_JRUBY_OPTS in the project .rvmrc. A bug prevented this from working for me, so use rvm head.

If not using rvm then use JRUBY_OPTS, which is the built-in way of doing it that JRuby checks (in fact, the PROJECT_JRUBY_OPTS thing ends up being converted to JRUBY_OPTS by rvm).

Community
  • 1
  • 1
Paul Biggar
  • 27,579
  • 21
  • 99
  • 152