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

rvm-auto-ruby: No such file or directory on Sublime Text 2 #49

Open
soundasleep opened this issue Feb 9, 2017 · 5 comments
Open

rvm-auto-ruby: No such file or directory on Sublime Text 2 #49

soundasleep opened this issue Feb 9, 2017 · 5 comments

Comments

@soundasleep
Copy link

I've installed the Sublime Text 2 Rubocop plugin but it's failing to check any file. When I run "Rubocop: Check current file", I get the following error:

/bin/sh: /Users/jevon/.rvm/bin/rvm-auto-ruby: No such file or directory
[Finished in 0.0s with exit code 127]
  • Operating System: Mac OS X 10.10.5
  • Sublime Text version - 2.0.2, build 2221
  • I don't have rvm installed, I use rbenv.
  • Running rubocop --version on my shell works fine.
  • I can't find any way to set settings for Rubocop, the only settings I can set are "Settings", "SublimeLinter Settings" and "Package Control Settings".

Is there a way to configure this plugin with Sublime Text 2 to not use rvm? Or to configure the command that's run?

@rebagliatte
Copy link

@soundasleep this linter uses rvm by default. You can override this on your user settings for the RuboCop sublime package.

Since I use rbenv, here's my RuboCop.sublime-settings:

{
  "check_for_rvm": false,
  "check_for_rbenv": true,
  "rbenv_path":  "/usr/local/bin/rbenv" // The path to your rbenv's binary. Run `which rbenv` to get it.
}

@abhilashak
Copy link

abhilashak commented Aug 1, 2017

If anyone wants to know the path of the rubocop settings:

rubocop-settings

I added the above hash as @rebagliatte suggested to User setting file. But that not seems to be working. I am using Sublime Text 3

@benkoshy
Copy link

benkoshy commented May 3, 2018

For anyone reading this in the future, this is what worked for me:

  1. I am using RVM.
  2. I installed auto ruby in the global gemset.
  3. I then discovered where the correct file path was by using the following command in the terminal: which rvm-auto-ruby
  4. from there, I navigated to the RuboCop settings page described above by @abhilashak and I added the correct file path in there.

Voila! Headache averted! Hope this helps someone!!

@alexanderadam
Copy link

alexanderadam commented Jul 31, 2020

It seems to be related to the mark_issues part in my case (I'm using rbenv):

  File "/path/to/sublime-3/Installed Packages/RuboCop.sublime-package/rubocop_listener.py", line 46, in update_marks
  File "/path/to/sublime-3/Installed Packages/RuboCop.sublime-package/rubocop_listener.py", line 128, in do_in_file_check
  File "/path/to/sublime-3/Installed Packages/RuboCop.sublime-package/rubocop_listener.py", line 121, in mark_issues
  File "/path/to/sublime-3/Installed Packages/RuboCop.sublime-package/rubocop_listener.py", line 114, in run_rubocop
  File "/path/to/sublime-3/Installed Packages/RuboCop.sublime-package/rubocop_runner.py", line 50, in run
  File "./python3.3/subprocess.py", line 819, in __init__
  File "./python3.3/subprocess.py", line 1448, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.rvm/bin/rvm-auto-ruby'

and I'm using this configuration:

{
 "mark_issues_in_view": true,
 "check_for_rvm": false,
 "check_for_rbenv": true,
 "show_auto_correct_warning": false,
 "rbenv_path": "~/.rbenv/bin/rbenv",
 "rubocop_config_file": "./.rubocop.yml"
}

@Startouf
Copy link

Startouf commented May 3, 2021

Same error on sublime text 3 here by the way, but rubocop seems to be working with the config from rebagliatte

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

6 participants