pderichs / sublime_rubocop

A Sublime Text RuboCop plugin.
238 stars 41 forks source link

Sublime rubocop with rbenv gemset ? #55

Open bekicot opened 7 years ago

bekicot commented 7 years ago

Error:

rbenv: rubocop: command not found
[Finished in 0.3s with exit code 127]
[cmd: /Users/bekicot/.rbenv/bin/rbenv exec rubocop /Users/bekicot/Projects/anak-pulau/osm_ppk_comparators.rb]
[dir: /Users/bekicot/Projects/anak-pulau]
[path: /usr/bin:/bin:/usr/sbin:/sbin]

I think the possible fix is to add an option to set environment variables manually, just like what Seeing Is Believing have done.

here is the excerpt from the code:

# set up env vars
env                   = os.environ.copy()
env_variables         = settings.get("environment_variables")
environment_variables = ({} if env_variables is None else env_variables) # prob a better way to do this, if you know the pythons, feel free to do it for me :D

https://github.com/JoshCheek/sublime-text-2-and-3-seeing-is-believing/blob/master/seeing_is_believing.py#L25

So that user can manually specify environment variables like image