Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when using overcommit and Github Desktop

Tags:

github

ruby

rvm

I am using overcommit gem (https://github.com/brigade/overcommit) in my project, when I use Github Desktop for osx I get these errors:

This repository contains hooks installed by Overcommit, but the overcommit gem is not installed. Install it with gem install overcommit. (1)

The gem is installed, it works in terminal. I guess it's because I use rvm and Github Desktop doesn't know about rvm. Anybody knows how to fix this?

like image 575
Chris Avatar asked Oct 16 '25 07:10

Chris


1 Answers

Ok finally got it to work! Combined the answer from @michelegera with comment from @rewritten

Step 1:

sudo su -
gem install bundler
gem install overcommit
gem install rubocop

Step 2: added command: ['bundle', 'exec', 'rubocop'] to .overcommit.yml

Thanks for the help!

like image 114
Chris Avatar answered Oct 18 '25 11:10

Chris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!