SASS not working after OSX upgrade - sass

I looks like SASS is trying to use the wrong version of ruby after the Yosemite update:
$ sass
bash: /usr/bin/sass: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
I'm pretty sure it should be pointing to /System/Library/Frameworks/Ruby.framework/Versions/current/...
Is there a way to update the sass ruby path?
edit
$sudo gem update sass
Has no effect

Uninstalling sass and reinstalling it fixed this
sudo gem uninstall sass
sudo gem install sass

You don't need to run sudo gem uninstall sass (sass -v yields the same error).
Running just sudo gem install sass is sufficient to update SASS.

Related

CodeKit: Sass/Compass Conflicts

I get this error when I try to compile using Compass on Codekit:
Compass failed to run because your Mac has an older version of Sass
and/or Compass installed that conflicts with the newer versions in
CodeKit. You must remove all versions of Sass below 3.3.rc6 and all
versions of Compass below 1.0.alpha18. Do this at the command line by
running 'sudo gem uninstall sass' and 'sudo gem uninstall compass'.
I ran sudo gem uninstall sass and sudo gem uninstall compass, however when I try to compile through CodeKit again I get the same error.
try running gem query --local this will list local gems, once you have a list, just go through and remove all sass+compass related gems with sudo gem uninstall ___, pretty sure that compass also has compass-core, but there are probably more
How have you initially installed your gems? Is it possible that you've also installed gems with just gem install? Cuz sudo gem installs gems as root for all users while gem install only installs gems for your active user. So maybe gems left installed which aren't uninstalled with sudo gem uninstall?
On the other hand why uninstall compass at all. I am running Codekit 2.1 with its internal Sass 3.3.10 along with the external gem Compass 0.12.4. That actually works quite well. You have go to Codekit Preferences -> Other Tools -> Compassand choose the radio button "Use the Compass executable at this path" and select your Compass gem then.
If you are using RVM for your ruby management then switch to your system ruby version
rvm use system
and install sass and compass for this version
sudo gem install sass
sudo gem install compass
This worked for me!

Susy not working with Compass and Sass

I'm getting a Gem:ConflictError when trying to run Susy. I noticed that Compass depends on sass 3.2.19 But the latest Susy depends on Sass (< 3.5, >= 3.3.0). I'm a nubie at this so what can I do to fix this?
Thanks!
You need to update your Compass to 1.0.0 or later.
gem install compass --pre
Even easier, use Bundler. Provided your Gemfile includes sass 3.3, Bundler will add the other dependencies.
So I was able to answer my own question by combining some of the answers I found here.
First uninstall compass an then do the follow:
Install rvm (stable with ruby add --insecure flag for SSL related issues) $\curl -sSL --insecure https://get.rvm.io | bash -s stable --ruby
Restart Terminal / Resource your profile
Run rvm requirements --with-gcc=clang You won't have to update Ruby because you downloaded the last stable version
And last step to run gem install compass --pre
I hope this helps anyone else who runs into the same problem!

OpenSuse - RubyGems install - wrong file names

I have a fresh OpenSuse 13.1 installation with all updates installed.
ruby -v --> ruby 2.0.0p247 (2013-06-27) [x86_64-linux]
gem -v --> 2.3.0
Running gem env outputs following: EXECUTABLE DIRECTORY: /usr/bin. It is also in my $PATH.
I tried to install sass and compass as described by the installation guides:
sudo gem install sass
sudo gem install compass
(I needed to use sudo because it didn't work without)
Only problem: neither running the commands sass nor compass work.
After a while I figured out that I had to use sass2.0 and compass2.0 to run them. The ruby scripts in /usr/bin are named with 2.0 at the end of the filename.
Why are those ruby scripts named with 2.0 at the end? How can I prevent this? I would like to use just compass and sass in the terminal.
I didn't get any results using Google.
It looks like openSUSE patches rubygems to keep multiple ruby versions installed, so it appends version number to files in bin/.
I've tried install sass package on my Linux x86_64 system and it produced sass, scss and sass-convert executables without extension.
I'd also warn to install gems this way, directly into filesystem. I'd recommend not avoiding package management and install through properly built packages. At openSUSE's wiki there is paragraph about how to package Ruby gems into rpms .
There is a solution to this problem in this SeverFault Post: https://serverfault.com/questions/535450/install-gems-of-ruby-1-9-bins-without-suffix-in-opensuse
You have to add the parameter --no-format-executable the the gem install command. Since I did not want to clutter my system I installed sass like this:
gem install --install-dir ./gems --no-format-executable sass
Now I can execute it with ./gems/bin/sass

Can't uninstall sass gem to use newer version

I can't seem to uninstall an old version of sass
I've done
sudo gem uninstall sass
as well as
sudo gem uninstall sass --version 3.2.14
When I try to do
sudo gem update sass
It says there are no updates.
What's the best way from here to force usage of the latest gem?
I hadn't tried taking sudo out. That did the trick.

Codekit not working with the Compass / Zurb Scss Compiler When I Upgraded to Mavericks with Ruby 2.0

CodeKit is giving me the error of
Compass was unable to compile one or more files in the project:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: illegal switch in RUBYOPT: -E (RuntimeError)
(This action was triggered by a change to _settings.scss)
It was working fine before the Upgrade.
Found the solution. Go to the "Terminal" and type:
sudo gem update --system
sudo gem install compass
And it's done!
You have CodeKit set to use an external Compass compiler, but you're running that Compass compiler in the old version of Ruby from 10.8 (Ruby 1.8.7).
You need to make sure Compass is running on the new system-installed version of Ruby (2.0) in Mavericks. Once you do that, you'll be all set. If you're using RVM, you can switch it back to the system Ruby and then simply run sudo gem install Compass to have Compass installed in the standard location.
I had this same problem just now. I installed compass again as Bryan suggested. After this it still didn't work, so I went into my preferences and saw that I previously had Codekit compiling from Compass at a user selected path. I switched this to "USe Codekit's internal Compass copmiler" and it is working again.
Found the solution. Go to the "Terminal" and type:
sudo gem update --system
sudo gem install compass
If you see this error:
Gem::LoadError on line ["298"] of /Library/Ruby/Site/2.0.0/rubygems/dependency.rb: Could not find 'zurb-foundation' ....
You probably need to install zurb-foundation, type this:
sudo gem install zurb-foundation
I just Changed my Compass Advanced settings back to internal compass compiler (recommended) and it worked.

Resources