I have previously been running an old version of Ruby, version 1.9.3, because that is what Ubuntu apt-get
installs. Sass was installed with gem install sass
and things works as planned. However, Sass would always tell me "Please upgrade ruby. < 2.0.0 will soon be not-supported," so I wanted to do that. I ran sudo apt-get purge ruby rubygems libruby
and started to go to work.
First, I tried to install is with rvm, and that didn't go too well, so I did my best to remove that, but I may have missed some things, so don't rule that out. As per this guide ruby seems to have been successfully installed. I then ran gem install sass
so I can compile some css. The following are some relevant outputs to prove the correct installation:
$ chruby
ruby-2.1.9
* ruby-2.3.1
$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
$ sass -v
Sass 3.4.22 (Selective Steve)
However, when I try to integrate Sass compiling into NetBeans 8.1, the compiler throws this error for every file.
"~/.gem/ruby/2.3.1/bin/sass" "--cache-location" "~/.cache/netbeans/8.1/sass-compiler" "--debug-info" <sass input> <sass output>
~/.rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'sass' (>= 0.a) among 11 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=~/.gem/ruby/2.3.0:~/.rubies/ruby-2.3.1/lib/ruby/gems/2.3.0', execute `gem env` for more information
from ~/.rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/dependency.rb:328:in `to_spec'
from ~/.rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
from ~/.gem/ruby/2.3.1/bin/sass:22:in `<main>'
Every file comes up with this error.
From reading around, it seems like it might be a path error. But it looks like I have the correct path setup.
$ echo $PATH
~/.gem/ruby/2.3.1/bin:~/.rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bin:~/.rubies/ruby-2.3.1/bin:~/bin:~/.gem/ruby/2.3.1/bin:~/.rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bin:~/.rubies/ruby-2.3.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
$ echo $GEM_PATH
~/.gem/ruby/2.3.1:~/.rubies/ruby-2.3.1/lib/ruby/gems/2.3.0
I'm willing to try anything at this point.
EDIT: More information on why it might be a path error.
whereis
for ruby, gem, and sass all output nothing. dpkg --get-selections | grep ruby
outputs nothing. type ruby
outputs the path to the .rubies directory, along with type gem
and type sass
outputs to the .gem directory.