When installing Compass (on Linux command line), can I specify which old version of SASS will be installed with it?
You can install a specific version of SASS using the following command:
gem install sass -v 3.3.4
Replace 3.3.4 with the preferred version.
You can find a list with all versions of SASS at RubyGems
Related
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!
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
I'd like to install Jekyll version 1.5.1 (on a Mac). Is it possible to do this? I found something about being able to downgrade, but I find it hard to believe there is no way just to install an older version.
Thanks!
You can specify the exact version in your Gemfile like this:
gem 'jekyll', '1.5.1'
Or install a specific version from the command line:
gem install jekyll -v 1.5.1
You can mention the version you want to run.
jekyll _2.4_ serve --watch
I downloaded two gem files: Sass-3.3.7.gem & compass-0.12.6.gem
I ran gem install --local Sass-3.3.7.gem which it installed.
Followed by the same command for compass, but got the error:
unable to resolve dependencies: compass requires sass (~>3.2.19)
I'm installing them pre-downloaded as I have no connection. Anyone knows what can be the solution?
Compass 0.12.6 apparently depends on sass ~>3.2.19, which means that the version of sass should be bigger than 3.2 and smaller than 3.3, so basically compass needs sass 3.2.x. You have two options.
Also download sass 3.2.19, install both versions of sass, use the latest one yourself and make compass happy.
Just install sass 3.2.19 and use that yourself as well, this obviously only works if you don't need any features introduced in sass 3.3.
Install Sass 3.2.19:
sudo gem install sass -v 3.2.19
I didn't need Sass 3.3.7, and Jekyll keep finding the latest version installed, so I got uninstalled Sass 3.3.7:
sudo gem uninstall sass
Sass doesn't seem to overwrite previous versions, so I still had 3.3.2 installed (if there are multiple versions installed it gives you a choice of what version you'd like to uninstall), so I uninstalled that as well.
You can run gem dependency <gem name> to see list of the gem dependencies and required versions.
I have just upgraded to Sass 3.3 so that I can use some of the new features (BEM styled class names, mappings, #at-root, etc). If I compile my project with Sass (via sass --watch), it works just fine. However, if I compile it using Compass (via compass watch), I get an error when using the new Sass features.
I'm using Compass 0.12.
Compass 0.12 explicitly depends on Sass 3.2. Even if you have a newer version of Sass installed, it will still compile with 3.2. In order to use Sass 3.3 or later, you have to be using Compass 1.0 or later.
Running the gem install command normally should get you the latest stable version.
gem install compass
At the time this question was asked, Compass 1.0 was still in beta. To install the latest beta version of a gem, you will need to install it using the --pre flag.
gem install compass --pre
Note that you do not need to install Sass first in order for this to work. Installing Compass will automatically install the latest version of Sass that it is compatible with.
I have Compass 1.0 installed and it still errors
Double check any other dependencies you might have (Compass extensions, etc.), one of them might be specifying an older version of Sass or Compass.
If you're using an application or build tool rather than using the commands directly, make sure they're not referencing older versions of Compass.
Windows users
As a Window user, I got an error when I tried to watch my project using the newer Compass.
LoadError on line ["36"] of C: cannot load such file -- wdm"
To fix that problem:
You must install the ruby DevKit:
Download found here: http://rubyinstaller.org/downloads/
Follow this page to properly install:
https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
Now install wdm:
gem install wdm
There didn't seem to be any one place that contained the whole list of steps required, in order, to make this work, so here they are. This list is for Windows, but it may work fine on other platforms.
Install Ruby -- use 1.9.3 -- http://rubyinstaller.org/downloads .
Download the Ruby DevKit found lower on the same page -- http://rubyinstaller.org/downloads/
run it to extract it somewhere (permanent). Then cd to it, run “ruby dk.rb init” and “ruby dk.rb install” to bind it to ruby installations in your path.
gem install wdm
gem install sass
gem install compass --pre
It now is, in the latest version of Compass. Update compass to get the changes and work with Sass 3.3 and higher
Current Sass compatibility can be found here: https://rubygems.org/gems/compass
To upgrade just run
$gem install compass