DEV Community

drew
drew

Posted on

1 2

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.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top 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!

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay