Adding support for per-Ruby environment variables #10

Closed
wants to merge 1 commit into from

4 participants

@robsweet

I'm running into trouble with Puppet installing JRuby gems because
JRUBY_HOME isn't set. Now I can drop an rbenv-vars file in when I install
JRuby and gem installations after that will work properly.

@robsweet robsweet Adding support for per-Ruby environment variables
I'm running into trouble with Puppet installing JRuby gems because
JRUBY_HOME isn't set.  Now I can drop an rbenv-vars file in when I install
JRuby and gem installations after that will work properly.
3ac888d
@sstephenson

Can you show an example of what your per-Ruby rbenv-vars file looks like?

@mislav

I don't like the fact that with this, you have to manually configure files inside ${RBENV_ROOT}/versions/. These are not guaranteed to be writeable for the user.

Why wouldn't it work for you to simply set JRUBY_HOME in ${RBENV_ROOT}/vars? It wouldn't affect non-JRuby versions, which don't pay respect to the variable

@johnbellone

@mislav During testing several Ruby versions wouldn't you want to separate this? I see some use for this. An example, at least for me, may be:

# ~/.rbenv/vars
DYLD_LIBRARY_PATH=$ORACLE_HOME:$DYLD_LIBRARY_PATH

If I just wanted to set Ruby specific versions, for let's say heap memory:

# ~/.rbenv/versions/1.9.3-p125/vars
RUBY_HEAP_MIN_SLOTS=400000

@sstephenson What do you think? This is something more people may run into while testing 2.0.0.

@mislav

Although I don't have use-cases for this, I can see how it can help some people, and the feature isn't intrusive. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment