New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complains that rubocop is not installed when bundling with --path
#17
Comments
@bbatsov anything I can do to help bring this to some resolution? |
Won't customising |
I have tried playing around with that before. Adding it now (and removing the rubocop gem and hence executable from my PATH) results in "RuboCop is not installed" when invoking |
Maybe |
That works as expected - I'm using |
I have rubocop installed to /usr/local/bin on my El Capitan Mac (installed with rvm use system; sudo gem install rubocop). I persistently get this problem. I fixed it with:
|
@bbatsov it looks like this function is short-circuiting some of the commands because it explicitly can't find |
We can always check the command to do both checks. PRs welcome. :-) |
@bbatsov thanks! I will try to tackle this in the coming week |
For those that vendorize their gems, the rubocop binary may not be on the exec path, even if it has been bundled. For such users, their check command will need to be `bundle exec rubocop` instead. This change will allow rubocop-emacs to proceed with using the bundled rubocop if rubocop is not found on the exec path. Fixes rubocop#17
For those that vendorize their gems, the rubocop binary may not be on the exec path, even if it has been bundled. For such users, their check command will need to be `bundle exec rubocop` instead. This change will allow rubocop-emacs to proceed with using the bundled rubocop if rubocop is not found on the exec path.
I'd noticed that flycheck hasn't been giving me rubocop feedback for a while. Just tracked this down - it's because when I
bundle install
I use the--path
flag to put my gems invendor/bundle
. Hence, if I want to run the executablerubocop
in my project I have to runbundle exec rubocop
. rubocop mode doesn't know this, however, and will simply not run with flycheck. Only on invoking something likeM-x rubocop-check-current-file
will it complain that rubocop is not installed.I realized that I can work around this by installing rubocop using my current Ruby with
gem install rubocop
i.e. outside of bundler. Of course, I would have preferred it if it had Just Worked.If this seems like an issue you'd like addressed I'd be happy to tackle it. Thanks!
The text was updated successfully, but these errors were encountered: