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.
- Install Visual studio code
- install the Ruby Solargraph extention in Visual studio Code.
Open the terminal, type:
sudo gem install Solargraph
at this point it should install, but I usually get errors.
If there are any kind of errors, do:
sudo apt-get install ruby-dev
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.
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.