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

Reek works from command line, but errors in the context of the editor #105

Open
joshminnie opened this issue Sep 16, 2017 · 4 comments
Open

Comments

@joshminnie
Copy link

I've been racking my brain trying to figure out why this occurs, but whenever I linter-reek is enabled within Atom, it errors out constantly with a series of "extensions are not built" messages.

[Linter] Error running reek Error: Ignoring bigdecimal-1.3.2 because its extensions are not built.  Try: gem pristine bigdecimal --version 1.3.2
Ignoring bindex-0.5.0 because its extensions are not built.  Try: gem pristine bindex --version 0.5.0
Ignoring byebug-9.1.0 because its extensions are not built.  Try: gem pristine byebug --version 9.1.0
Ignoring byebug-9.0.6 because its extensions are not built.  Try: gem pristine byebug --version 9.0.6
Ignoring executable-hooks-1.3.2 because its extensions are not built.  Try: gem pristine executable-hooks --version 1.3.2
Ignoring ffi-1.9.18 because its extensions are not built.  Try: gem pristine ffi --version 1.9.18
Ignoring gem-wrappers-1.2.7 because its extensions are not built.  Try: gem pristine gem-wrappers --version 1.2.7
Ignoring json-2.1.0 because its extensions are not built.  Try: gem pristine json --version 2.1.0
Ignoring mysql2-0.4.9 because its extensions are not built.  Try: gem pristine mysql2 --version 0.4.9
Ignoring nio4r-2.1.0 because its extensions are not built.  Try: gem pristine nio4r --version 2.1.0
Ignoring nio4r-2.0.0 because its extensions are not built.  Try: gem pristine nio4r --version 2.0.0
Ignoring nokogiri-1.8.0 because its extensions are not built.  Try: gem pristine nokogiri --version 1.8.0
Ignoring nokogiri-1.7.2 because its extensions are not built.  Try: gem pristine nokogiri --version 1.7.2
Ignoring openssl-2.0.3 because its extensions are not built.  Try: gem pristine openssl --version 2.0.3
Ignoring posix-spawn-0.3.13 because its extensions are not built.  Try: gem pristine posix-spawn --version 0.3.13
Ignoring puma-3.10.0 because its extensions are not built.  Try: gem pristine puma --version 3.10.0
Ignoring puma-3.9.1 because its extensions are not built.  Try: gem pristine puma --version 3.9.1
Ignoring puma-3.8.2 because its extensions are not built.  Try: gem pristine puma --version 3.8.2
Ignoring rainbow-2.2.2 because its extensions are not built.  Try: gem pristine rainbow --version 2.2.2
Ignoring redcarpet-3.4.0 because its extensions are not built.  Try: gem pristine redcarpet --version 3.4.0
Ignoring sqlite3-1.3.13 because its extensions are not built.  Try: gem pristine sqlite3 --version 1.3.13
Ignoring websocket-driver-0.6.5 because its extensions are not built.  Try: gem pristine websocket-driver --version 0.6.5
    at ChildProcess.<anonymous> (/Users/josh/.atom/packages/linter-eslint/node_modules/sb-exec/lib/index.js:56)
    at emitTwo (events.js:106)
    at ChildProcess.emit (events.js:191)
    at maybeClose (internal/child_process.js:885)
    at Socket.<anonymous> (internal/child_process.js:334)
    at emitOne (events.js:96)
    at Socket.emit (events.js:188)
    at Pipe._handle.close [as _onclose] (net.js:501)

Background and things I've tried:

  • I am using RVM, but I've toggled between all my gemsets and rubies and running the reek command from my command line works without error.
  • When I open Atom, in the context of a project, they often have a specified ruby and gemset. Running from the command line in this context works fine.
  • I have a executable path specified as one of my default rubies. /Users/josh/.rvm/gems/ruby-2.2.2/bin/reek. Running specifically in the default ruby/gemset, which would call on this pass when I call reek from the command line works fine.
@duffyjp
Copy link

duffyjp commented Oct 4, 2017

@joshminnie Did you by chance install Mac OS High Sierra right before this started happening?

For me it's happening with any ruby shell script.

foo.rb

#!/usr/bin/ruby
🌶  $ ./foo.rb 
Ignoring bcrypt-3.1.11 because its extensions are not built.  Try: gem pristine bcrypt --version 3.1.11
Ignoring bcrypt-3.1.10 because its extensions are not built.  Try: gem pristine bcrypt --version 3.1.10
Ignoring bigdecimal-1.3.2 because its extensions are not built.  Try: gem pristine bigdecimal --version 1.3.2
Ignoring bigdecimal-1.3.1 because its extensions are not built.  Try: gem pristine bigdecimal --version 1.3.1
Ignoring bindex-0.5.0 because its extensions are not built.  Try: gem pristine bindex --version 0.5.0
Ignoring byebug-9.1.0 because its extensions are not built.  Try: gem pristine byebug --version 9.1.0
Ignoring byebug-9.0.6 because its extensions are not built.  Try: gem pristine byebug --version 9.0.6
Ignoring byebug-8.2.1 because its extensions are not built.  Try: gem pristine byebug --version 8.2.1
Ignoring curses-1.2.3 because its extensions are not built.  Try: gem pristine curses --version 1.2.3
Ignoring debug_inspector-0.0.3 because its extensions are not built.  Try: gem pristine debug_inspector --version 0.0.3
Ignoring debug_inspector-0.0.2 because its extensions are not built.  Try: gem pristine debug_inspector --version 0.0.2

After uninstalling each gem, and reinstalling as needed I'm down to this:

🌶  $ ./foo.rb 
Ignoring byebug-9.1.0 because its extensions are not built.  Try: gem pristine byebug --version 9.1.0

@joshminnie
Copy link
Author

@duffyjp I am currently on Sierra, it's been happening for a while and I've been attempting to fix it through various cleanups. I even went so far as to uninstall all my rubies and gemsets. Which is why I'm at a loss for the difference.

@joshminnie
Copy link
Author

I figured out what the problem was. I'm not sure this is the right solution, but my system default ruby was 2.4.0, while the ruby for the project I was in was 2.2.2. Once I switched my system default ruby to 2.2.2, it worked again.

I did not have executable path defined in Atom settings because I thought using the command bundle exec rubocop would be sufficient.

@mac-manu
Copy link

mac-manu commented Mar 8, 2018

gem pristine --all

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

No branches or pull requests

3 participants