Open carlosbaraza opened 9 years ago
GEM_PATH is wrongly set for me too, would be a nice feature!
Pointing from the executable path to a small script using rvm underneath did the trick for me ;)
I mean something like this (with your ruby version of choice)
FWIW I installed rubocop and reek on 1.9.3 like this:
gem install rubocop -v 0.41.2
gem install unparser -v 0.2.4
gem install reek -v 2.2.1
That doesn't help on 1.8.7 of course... Just figured I'd mention it here so I'll find it when I'm googling for this two years from now.
Has anyone found a fix for this?
@chrishough I have created new file .atom/rubocop
with chmod +x
:
#!/bin/bash
source ~/.rvm/scripts/rvm
rvm use --your_ruby_version--@--your_gemset(if you use)-- &>/dev/null
rubocop $@
Don't forget to replace your_ruby_version
and your_gemset
. If you don't use gemset, just use
rvm use --your_ruby_version-- &>/dev/null
rvm-exec bundle exec rubocop
worked for me
We are using rbenv @quolpr @ngan, thoughts?
Looks like rbenv has their own exec: https://github.com/rbenv/rbenv/blob/master/libexec/rbenv-exec
Thank you @ngan
This will be implemented on #411
Hi,
In my particular case, at work we are maintaining a big rails application developed in Ruby 1.8.7. However, we want to follow the recommendations from Rubocop (which does not support 1.8.7, but 1.9.3). We have some rules configured for our 1.8.7 version.
The problem is that in atom I was receiving this issue message (Obtained from the Linter debug option):
Then I decided to set the command (
cmd
) to execute directly on thelinter-rubocop.coffee
file. And also, not set up therubocopExecutablePath
config option.However, this will bring another problem. The
GEM_PATH
environmental variable is not set:Finally, I solved this issue in the
init.coffee
adding this line to the activate function.Now, I would like to maybe create a fork and solve this issue in a more elegant way. Does anybody has a recommendation on how to proceed with this? I thought about creating an optional config variable for the GEM_PATH, Ruby and Rubocop.
Thank you all for this great plugin. Carlos.