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 gem '...' in locally installed gems" Upon Running Overcommit #798

Open
jeffsaremi opened this issue Nov 9, 2022 · 3 comments

Comments

@jeffsaremi
Copy link

jeffsaremi commented Nov 9, 2022

None of overcommit commands run. They all produce this error:

Resolving dependencies........
Could not find gem 'cadence-ruby' in locally installed gems
Run `bundle install` to install missing gems.

However:

❯ bundle info cadence-ruby
  * cadence-ruby (0.1.15)
        Summary: Cadence Ruby client
        Homepage: https://github.com/coinbase/cadence-ruby
        Path: /Users/jeffsaremi/.rvm/gems/ruby-2.7.6/gems/cadence-ruby-0.1.15

Manually installing gem install cadence-ruby -v 0.1.15 does not help

However running overcommit commands (eg overcommit --run) with a bundle exec works. eg:
bundle exec overcommit --run

But still none of the git hooks run :

❯ git commit -am "removing dummy changes"
Problem loading 'Gemfile': Could not find gem 'cadence-ruby' in locally installed gems
Try running:
bundle install --gemfile=Gemfile
❯ bundle version
Bundler version 2.2.20 (2021-06-11 commit 4c510a34a4)

❯ ruby -v
ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [x86_64-darwin21]

@alfuken
Copy link

alfuken commented Nov 17, 2022

not really a fix but a clutch: try installing both gems into MacOS default system ruby

@jeffsaremi
Copy link
Author

Thanks Bodhan! I will try this and get back to you

@jeffsaremi
Copy link
Author

I did this which still made no difference:

❯ sudo gem install --no-user-install cadence-ruby -v 0.1.15
Password:
Fetching thrift-0.17.0.gem
Fetching oj-3.13.23.gem
Fetching cadence-ruby-0.1.15.gem
Building native extensions. This could take a while...
GemWrappers: Can not wrap not executable file: codeowners
Successfully installed oj-3.13.23
Building native extensions. This could take a while...
GemWrappers: Can not wrap not executable file: codeowners
Successfully installed thrift-0.17.0
GemWrappers: Can not wrap not executable file: codeowners
Successfully installed cadence-ruby-0.1.15
Parsing documentation for oj-3.13.23
Installing ri documentation for oj-3.13.23
Parsing documentation for thrift-0.17.0
Installing ri documentation for thrift-0.17.0
Parsing documentation for cadence-ruby-0.1.15
Installing ri documentation for cadence-ruby-0.1.15
Done installing documentation for oj, thrift, cadence-ruby after 4 seconds
3 gems installed

❯ sudo gem install --no-user-install bundler
Fetching bundler-2.3.26.gem
GemWrappers: Can not wrap not executable file: codeowners
Successfully installed bundler-2.3.26
Parsing documentation for bundler-2.3.26
Installing ri documentation for bundler-2.3.26
Done installing documentation for bundler after 0 seconds
1 gem installed

❯ overcommit --run
Resolving dependencies.........
Could not find gem 'cadence-ruby' in locally installed gems
Run `bundle install` to install missing gems.

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

2 participants