Skip to content

Sublime rubocop with rbenv gemset ? #55

@bekicot

Description

@bekicot
  • Mac OS Sierra
  • Sublime Text 3
  • rbenv, rbenv gemset

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions