AtomLinter / linter-codeclimate

An Atom Linter plugin for the Code Climate CLI
http://github.com/codeclimate/codeclimate
MIT License
10 stars 5 forks source link

Extra steps I had to take to get running under Ubuntu 16.04 #54

Closed jakeBarwell closed 7 years ago

jakeBarwell commented 7 years ago

I am very much expecting for someone to tell me I did something stupid, but I had to do the following to get this working in Ubuntu 16.04.

So I setup codeclimate cli as per documentation. This was working great via command line. I altered the path in settings to point to correct location so no issues with not finding executable.

I then got this: usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- cc/yaml (LoadError)

To resolve this I need to manually install each dependency using gem install.

Once I had done this I then got this error: Error: error: (Errno::EACCES) Permission denied @ rb_sysopen - /tmp/cc/892aeb9d-d516-4e01-81dd-3b2936387ca2

The cc directory is being mounted as root, I guess due to the daemon running as such. So I changed the owner:group to my user on the cc directory and the plugin worked great. Note I was running the codeclimate cli without sudo via terminal and it was working.

maxjacobson commented 7 years ago

Hi @jakeBarwell!

It sounds like maybe you installed via gem install codeclimate?

We recommend installing the CLI as a docker image - that way you don't need to be manually installing the dependent gems. The steps are here: https://github.com/codeclimate/codeclimate#anywhere

jakeBarwell commented 7 years ago

Hey @maxjacobson thanks for reply.

No didn't use gem install. Installed as docker image using the curl method you linked to.

maxjacobson commented 7 years ago

Hm interesting.

I just tried setting this up on a linux machine and found that I had to explicitly set the path in the package settings to /usr/local/bin/codeclimate, and then things worked for me. It definitely seems like it's picking up a different codeclimate binary if it's trying to load missing gems. Another thing you can check is which codeclimate in your terminal, and make sure that it's pointing to the CLI wrapper script that runs the docker container

jakeBarwell commented 7 years ago

Ok thanks I have it working at the moment but will need to reinstall from scratch soon as new Laptop coming. So will test out fully when I reinstall, will close this as it does seem like I messed up somewhere, if I have issues again on fresh install will re raise issue with further detail.

jakeBarwell commented 7 years ago

Ok @maxjacobson . I reinstalled today and yea the extra step of setting full path worked flawlessly. So the default does not work (I went wrong on my first install by pointing to the full path of the bin in the Codeclimate repo directory rather than the /usr/local/bin/codeclimate). Could be a useful tip on documentation.

maxjacobson commented 7 years ago

Glad it's working for you now!

Agreed the docs (or maybe the in-app configuration screen?) could be more clear