DEV Community

drew
drew

Posted on

Getting Solargraph to work on linux

This is a depart from my usual Java posts, but I ran across my notes from when I was trying to learn Ruby and thought it might be helpful. Works as of jan 2nd, 2020.

Solargraph adds intellisense features to Visual studio code (code completion, etc) for Ruby. I had a beast of a time getting it to work on Linux, mainly trying to figure out what to do with all the errors. These are the steps I used to get it working, hopefully they help someone.

  1. Install Visual studio code
  2. install the Ruby Solargraph extention in Visual studio Code.
  3. Open the terminal, type:

    sudo gem install Solargraph

  4. at this point it should install, but I usually get errors.

  5. If there are any kind of errors, do:

    sudo apt-get install ruby-dev

  6. If that doesn't quite clear it up, do:

    sudo apt-get install make

Make was already installed for me this last time, but the last distro I used it wasn't.

  1. At one point I had to install a zlib because it was missing. so:

    sudo apt-get install zlib1g-dev

after step 5 I would just do step 3 and see if that worked. I've had to do this several times because I changed Linux distros, and each distro had different bits already installed but not others. Hopefully If you've run into this issue these steps helped.

Thanks for reading.

Oldest comments (2)

Collapse
 
ezziwa profile image
ezziwa

Thanks alot it has helped me out big !!

Collapse
 
andevr profile image
drew

You're welcome, glad it helped!