0

I want to compile a sass file but whenever I run this command:

$ compass compile
compass: command not found 

And I tried to install compass by this command:

$ sudo gem install sass compass --pre --no-ri --no-rdoc
Successfully installed sass-3.3.0.alpha.121
    ERROR:  Error installing compass:
    compass requires sass (~> 3.2.5, runtime)
1 gem installed

and when I check the version of sass by sass -v it shows Haml/Sass 2.2.17.

so what should I do now ?

2

Install compass with the package manager.

ruby-compass is in the universe repository, so make sure you have a

deb http://<your-server>/ubuntu/ <your-ubuntu-version> universe

line in your /etc/apt/sources.list

Next run:

sudo apt-get update; apt-get install ruby-compass

See also https://help.ubuntu.com/community/Repositories/Ubuntu

3
  • root@ubc-8-desktop:~# apt-get install ruby-compass Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package ruby-compass – Abhimanue Tamang Apr 17 '13 at 7:15
  • Did you add the universe repository and a sudo apt-get update – koni_raid Aug 17 '16 at 11:47
  • In the mentioned file I have these: deb http://security.ubuntu.com/ubuntu trusty-security universe, deb http://in.archive.ubuntu.com/ubuntu/ trusty universe, deb http://in.archive.ubuntu.com/ubuntu/ trusty-updates universe. lsb_release -a shows Description: Ubuntu 14.04.5 LTS. Meaning the version number 14.04.5 LTS is mentioned nowhere in source.list file. Do I need to add this manually? Please suggest. – Niladri Sarkar May 22 '17 at 13:32
0

Ok found on a link to fix it just run this command on your terminal echo "PATH=\$PATH:/var/lib/gems/1.8/bin:\$HOME/.gem/ruby/1.8/bin" >> /etc/profile.d/rubygems1.8.sh

and restart my system. But it only run when I have root access so for root access rum sudo-s first.

And also command to install compass follow this link or quickely try this command
gem install compass

0

For me the problem was that compass was installed as /usr/bin/compass.ruby2.1

I created a symbolic link from /usr/bin/compass.ruby2.1 to /usr/bin/compass and it started working. I am not sure if it this is expected behavior or not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.