Skip to content
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

Could not find 'rubocop'. The program may not be installed. #2381

Open
4 of 5 tasks
mullermp opened this issue Aug 27, 2019 · 1 comment
Open
4 of 5 tasks

Could not find 'rubocop'. The program may not be installed. #2381

mullermp opened this issue Aug 27, 2019 · 1 comment

Comments

@mullermp
Copy link

mullermp commented Aug 27, 2019

Description

When trying to run atom-beautify using rubocop, I get the following error

Full error message:

See rubocop installation instructions at https://github.com/Glavin001/atom-beautify#beautifiers or go to http://rubocop.readthedocs.io/en/latest/installation/
You can configure Atom Beautify with the absolute path to 'rubocop' by setting 'Executable - Rubocop - Path' in the Atom Beautify package settings.
Your program is properly installed if running 'which rubocop' in your Terminal returns an absolute path to the executable.

I am using chruby: https://github.com/postmodern/chruby with ruby version 2.6.3 and rubocop 0.74.0.

Environment output:

mamuller@4c327598178f:~/workplace/aws-sdk-ruby$ which rubocop
/Users/mamuller/.gem/ruby/2.6.3/bin/rubocop

mamuller@4c327598178f:~/workplace/aws-sdk-ruby$ rubocop -v
0.74.0

mamuller@4c327598178f:~/workplace/aws-sdk-ruby$ chruby-exec ruby -- rubocop -v
0.74.0
Saving session...
...copying shared history...
...saving history...
...completed.

mamuller@4c327598178f:~/workplace/aws-sdk-ruby$ cat ~/.ruby-version 
ruby-2.6.3

mamuller@4c327598178f:~/workplace/aws-sdk-ruby$ echo $PATH
/Users/mamuller/.toolbox/bin:/Users/mamuller/.gem/ruby/2.6.3/bin:/Users/mamuller/.rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/bin:/Users/mamuller/.rubies/ruby-2.6.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/MacOS

mamuller@4c327598178f:~/workplace/aws-sdk-ruby$ cat ~/.bash_profile | grep chruby
# https://github.com/postmodern/chruby
source /usr/local/share/chruby/chruby.sh
source /usr/local/share/chruby/auto.sh

Atom process.env output has path as:

"/Users/mamuller/.toolbox/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/MacOS:/Users/mamuller/.toolbox/bin"

with no GEM_HOME/GEM_PATH/GEM_ROOT set.

When running Atom via CLI, process.env reports the path to be:

"/Users/mamuller/.toolbox/bin:/Users/mamuller/.gem/ruby/2.6.3/bin:/Users/mamuller/.rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/bin:/Users/mamuller/.rubies/ruby-2.6.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/MacOS"

as well as GEM_HOME/GEM_PATH/GEM_ROOT being set correct.

The linter-rubocop plugin works correctly (started by CLI or by Mac dock) using the command:

/usr/local/bin/chruby-exec ruby -- rubocop

Input Before Beautification / # Expected Output / # Actual Output

These sections do not apply.

Steps to Reproduce

  1. Start Atom using CLI or Mac dock
  2. Add code to Atom editor
  3. Run command Atom Beautify: Beautify Editor
  4. Rubocop could not be found

Debug

Here is a link to the debug.md Gist: https://gist.github.com/mullermp/a65a2ad60624cbe1e5ccdf96f9b6e185

Checklist

I have:

  • Tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
  • Reloaded (or restarted) Atom to ensure it is not a caching issue
  • Searched through existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
    so I know this is not a duplicate issue
  • Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
  • This doesn't apply
  • Generated debugging information by executing Atom Beautify: Help Debug Editor command in Atom and added link for debug.md Gist to this issue
@mullermp
Copy link
Author

Bump!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant