I realize this is a Rails specific question - but it’s also specific to
jRuby, so I’m hoping someone can help me out as I haven’t found an
answer
via google yet.
We run development, staging, preview and production servers for our java
apps. We use a jvm option on each of these servers to indicate which it
is
- very much like RAILS_ENV is used - so that java apps can be configured
to
act appropriately.
Not only would it be extremely helpful to be able to take advantage of
these
already set JVM options, but I’m stuck if I’m not able to… our
environment is setup such that once a .war file hits staging, that same,
unmodified version is the one that gets pushed up the ladder till it
hits
prod. I can’t, therefore, re-package it with Warbler at each step -
changing the rails_env as we go. (Which is not something I’d consider a
good practice anyway…).
So… can someone shed some light on whether or not I can add something
to
the project to set RAILS_ENV from a jvm option when the app starts up?
Thanks!
M@