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

Using rvm with custom gemset causes a rubocop LoadError message #19

Open
Nemtes opened this issue May 14, 2014 · 15 comments
Open

Using rvm with custom gemset causes a rubocop LoadError message #19

Nemtes opened this issue May 14, 2014 · 15 comments
Labels

Comments

@Nemtes
Copy link

Nemtes commented May 14, 2014

I am running OSX 10.9.2, with rubocop and rvm. I use a custom gemset for the project but I only can check one file and not the whole project.

ruby: No such file or directory -- rubocop (LoadError)
[Finished in 0.4s with exit code 1]
[cmd: ['/Users/nemtes/.rvm/bin/rvm-auto-ruby -S rubocop  /Users/nemtes/Projekte/****']]
[dir: /Users/nemtes/Projekte]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
@pderichs
Copy link
Owner

Indeed, that seems to be a bug - using a custom gemset with rvm is currently not working.

@pderichs pderichs added the bug label Aug 12, 2014
@teonimesic
Copy link

@Nemtes and @MatthewRDodds why simply not use bundler instead of rvm gemsets? They are redundant and bundler is better in many ways.

@bigardone
Copy link

+1, same issue here

@iRet
Copy link

iRet commented Oct 14, 2014

I seems to work well with custom gemset and rvm on my side out of box.

@scotthue
Copy link

scotthue commented Dec 6, 2014

+1, same issue

@dmil
Copy link

dmil commented Dec 12, 2014

+1

@christoshrousis
Copy link

Rubocop package working fine for me... Including full project check.

My RVM Version

rvm -v
rvm 1.26.3 (master) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]

Create gemset files.

mkdir example
touch example/.ruby-gemset
echo "example" >> example/.ruby-gemset
touch example/.ruby-version
echo "ruby-2.1.1" >> example/.ruby-gemset
touch example/Gemfile

Alter your gemfile to look something like this:

source 'https://rubygems.org'

gem 'rubocop'

Enter directory, which will generate rvm wrappers and install rubocop gem.

cd example
bundle install

Rubocop package

Proceed to install the rubocop package into sublime using something like cmd+shift+p, searching package install, then searching rubocop.

Once package is installed quit all sublime windows, proceed to produce a rb file and it should be markedup by rubocop on save...

@iRet
Copy link

iRet commented Jan 26, 2015

Did you guys tried to tune config?
I've described process in wiki but for rbenv.
Config also includes keys to turn on rvm support.

@gracemus
Copy link

same error on Linux 👍
how to fix this?
:(

@pderichs pderichs changed the title ruby: No such file or directory -- rubocop (LoadError) Using rvm with custom gemset causes a rubocop LoadError message Apr 12, 2015
@pderichs
Copy link
Owner

The title was a bit too general, so I changed it to reflect the real initial topic.

@scoobyclub
Copy link

I know this is old but the solution for me was to install rubocop into the global gems rather than custom one. Then it worked fine, even without restarting.

@fkagami
Copy link

fkagami commented Jan 7, 2016

+1

@karuppasamy
Copy link

Fix: Installed rubocop globally.

rvm @global do gem install rubocop

https://rvm.io/gemsets/global

@domanhtien2011
Copy link

@karuppasamy Thank you very much for the suggestion. Installing the gem globally works for me. Have a nice day.

@huynhquocthai
Copy link

If you use RuboCop with Rails, just edit or create new file .ruby-version with content like this: ruby-version@your-gemset-name. It's worked for me :)

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

No branches or pull requests