Skip to main content
Select a menu in the customizer
The Home of Mogness

installing gems per-user for use with PhpStorm, no sudo required

Stumbled across this “gem” of an article (no pun intended) today while I was trying to sort out a fresh install of my dev environment. As much as I might bitch and complain about the various JetBrains IDEs, they are a pretty powerful set of cross-platform tools that I use in the absence of a suitable Visual Studio replacement in Linux. I use sass in most all of my projects, which luckily, integratese pretty straightforward with PhpStorm, my IDE of choice for wordpress development.

I’m wary of installing most ruby gems system-wide with sudo though, because mainly it just feels gross but I’m also concerned I’ll run into collisions if I need to use different versions of Ruby at different times for, ya know, stuff. Anyway, as it turns out, gem offers an elegant way of handling this on the command line:
gem install --user sass

Granted I still needed to config PhpStorm proper to find and use sass with my code, which is about as simple as:

Finding the right setting in the PhpStorm setting UI:
scss-watcher-config-stepone

Creating a file-watcher for your scss:
scss-watcher-config-steptwo

As an aside, if you’re a student and can prove it with any @edu domain, you can get a full year’s license to try ALL of jetbrains products. That is:

Jetbrains Student License

IntelliJ IDEA Ultimate
ReSharper
ReSharper C++
dotTrace
dotMemory

dotCover
AppCode
CLion
PhpStorm
PyCharm

RubyMine
WebStorm
DataGrip

 

Just a heads up. Pretty useful set of tools.