Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Could not find 'rubocop' (>= 0) among 8 total gem(s) (Gem::LoadError) when using chruby #129

Closed
goronfreeman opened this issue Jun 23, 2016 · 6 comments
Labels

Comments

@goronfreeman
Copy link

I'm having the exact same issue as #127, but I am using chruby, not RVM. If I start atom from the command line, it will load Rubocop and linting does work.

$ ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin15.0]
$ which rubocop
/Users/hbraun/.gem/ruby/2.1.2/bin/rubocop
Error: /Users/hbraun/.rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'rubocop' (>= 0) among 8 total gem(s) (Gem::LoadError)
    from /Users/hbraun/.rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/dependency.rb:309:in `to_spec'
    from /Users/hbraun/.rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:53:in `gem'
    from /Users/hbraun/.gem/ruby/2.1.2/bin/rubocop:22:in `<main>'
    at /Users/hbraun/.atom/packages/linter-rubocop/index.coffee:30:15
@opes
Copy link

opes commented Aug 23, 2016

@goronfreeman Were you able to figure out anything with this? I've run into it as well (using chruby).

@goronfreeman
Copy link
Author

@opes Unfortunately, no. I've just been opening Atom through the command line, as that seems to load the PATH correctly.

@Arcanemagus
Copy link
Member

I'm not sure there is anything that can be done about this here... all of those "change program version" things (rvm, chruby, nvm, n, ...) seem to do different, hacky things to get it working in the CLI, which doesn't translate well (or at all) to things that aren't a pure CLI environment.

You can try figuring out how chruby is doing this, why it isn't working currently, and filing an issue over on consistent-env to get it fixed there, as that's what is used to run things here. For now though marking this as closed as it's an external issue.

As you have seen, the workaround for this is to just launch Atom from the CLI initially.

@pecigonzalo
Copy link

For some reason this procedure does not seem to work anymore. Any ideas?

@Arcanemagus
Copy link
Member

@pecigonzalo Can you please file a new issue?

@pecigonzalo
Copy link

Done under #168

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

No branches or pull requests

4 participants