This is my configuration for Atom, I figured an example would help make it clearer.
I am using Atom 0.138.0, in older versions, the configuration went at the root-level of the document instead of under 'global'
I am using chruby, which is why I have a separate executable to wire up the environment. If I made the package better, you could just provide it with this information and wouldn't need a separate executable.
This separate executable is the same way that rvm works if you type rvm wrapper 2.1 sib
, it will make you a program that does this same thing as the one I wrote, but for rvm. You can then do which sib_ruby
to get the path, and set that as the global.seeing-is-believing.ruby-command
If you're using rbenv
, you don't need a binary, you can use the output of which ruby
, but you need to set the RBENV_VERSION
environment variable by setting the configuraiton global.seeing-is-believing.add-to-env.RBENV_VERSION
, I recently set it to 2.1.1
for someone, and set their ruby command to /Users/username/.rbenv/shims/ruby
, which worked correctly. You can see a list of options wiht rbenv versions
, and can play around in the shell to see if it is correct by doing env RBENV_VERSION=1.9.3-p327 ruby --version
and making sure that chruby selects the one you want. Once you're sure the env var is good, you'll know which value to add to the configuration.
I only set the global.seeing-is-believing.ruby-command
because SiB
's defaults are sufficient for all other configuration.