11

The problem

grunt server outputs this:

Warning: Task "compass:server" not found.

I uploaded Gruntfile.js here: https://gist.github.com/ComFreek/7289648
That's the default file I got after creating a new Yeoman project.


Details

I am reading Building Web Apps With Yeoman And Polymer and following the described console commands to run.

My system:

  • Windows 8.1 Pro 64-bit
  • NodeJS 0.10.21
  • NPM 1.3.11

I've already executed these commands:

npm install -g yo
npm install generator-polymer -g

yo polymer

grunt server told me that I had to install Ruby and Compass.

  • I installed Ruby from here: http://rubyinstaller.org/
    After installing, I also successfully whether Ruby has really been registered in the PATH.

  • I used NPM for installing Compass:

    npm install grunt-contrib-compass --save-dev -g
    

    (I tried a local and global install of Compass. Neither of them worked.)


This is the exact output of grunt:

D:\test>grunt server
Running "server" task
Warning: Task "compass:server" not found. Use --force to continue.

Aborted due to warnings.

Elapsed time
server  4ms
Total   4ms


It works now...

Unfortunately, I still don't know the exact cause. I went through all of my instructions above again, and it just worked out of the box.

In any case, I recommend updating all packages. My version numbers are (last edited: 02.02.14):

[NodeJS v.0.10.24]
[NPM 1.3.21]
[grunt-cli v0.1.11]
[grunt v0.4.2]

4 Answers 4

9

I had the same problem but it was fixed after I've installed Ruby's compass:

# gem install compass

Hint: gem is the package manager for Ruby, so Ruby should be existing in the system.

For Redhat's based linux systems, you can use the following to install Ruby and gem:

# yum install gcc ruby-devel rubygems
# gem install compass

For Debian's based linux systems, you can check this

1
  • sudo apt-get install ruby-full sudo gem install compass Commented Apr 17, 2018 at 16:50
5

Install compass with the following command:

npm install -g compass

If you've installed node as a sudo user (which is not recommendable), you should add sudo to the command (and next time use NVM)

sudo npm install -g compass
3
  • Thanks for your answer. After going through all of my instructions above again, I do not receive the error anymore. It works fine. I'm sorry for your time (for writing the answer). If anyone is interested, here are all version numbers: NodeJS, v.0.10.24, NPM 1.3.21, grunt-cli v0.1.11, grunt v0.4.2.
    – ComFreek
    Commented Feb 2, 2014 at 9:38
  • After installing compass with -g i still have the issue. node -v: 5.10.0 npm --v: 3.5.2 grunt --version: 0.4.5
    – artdias90
    Commented May 9, 2016 at 8:43
  • 1
    This solution requires additional installation steps as it's simply a wrapper over the ruby compass gem as described in github.com/ngryman/compass. The gem must also be installed (gem install compass). See the other answers for gem instructions. Update: You may not even need the compass npm package after the gem is installed.
    – sshow
    Commented Aug 28, 2017 at 9:18
1

Install Ruby, add to env -> path variable, add to pathtext as per link below

http://www.tutorialspoint.com/ruby/ruby_installation_windows.htm

Then install compass in ruby.

Only this solved the issue

-1

The only thing that worked for me was:

npm install ruby-compass.

I had previously installed compass like Paul said but didn't work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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