jlong / serve

Serve is a small Rack-based web server and rapid prototyping framework for Web applications (specifically Rails apps). Serve is meant to be a lightweight version of the Views part of the Rails MVC. This makes Serve an ideal framework for prototyping Rails applications or creating simple websites. Serve has full support for Rails-style partials and layouts.
http://get-serve.com
Other
836 stars 90 forks source link

undefined method `declare' for Sass::Script::Functions:Module #20

Closed jelle closed 13 years ago

jelle commented 13 years ago

Started getting this error after installing edge versions for Compass/Haml/Sass.

Gem list:

compass (0.11.beta.2, 0.10.6, 0.10.5, 0.10.4, 0.10.2) haml (3.1.0.alpha.147, 3.0.25, 3.0.23, 3.0.17, 3.0.15) rack (1.2.1, 1.1.0, 1.0.1) sass (3.1.0.alpha.221) serve (1.0.0)

Moving the "require 'sass/plugin/rack'" line after the "Compass.configure_sass_plugin!" line in config.ru fixes the problem. (Figured this out with a little help from our developer. I'm a designer so I'm clueless when it comes to config.ru)

adamstac commented 13 years ago

Could you post a new comment with a gist of your config.ru file?

jelle commented 13 years ago

Hey Adam,

Posted at https://gist.github.com/879095

Jelle

jelle commented 13 years ago

This problem (and hacky solution) persists. Encountered it in my local radiant-prototype project.

mraaroncruz commented 13 years ago

I'm getting it too, with base project (serve create) and also when using Adam's boilerplate (after running bundle and creating new project with the rake command).
jelle's hack isn't working for me either.

nathanl commented 13 years ago

I had this error, and upgrading my Gemfile to Haml 3.1.1 fixed it.

mraaroncruz commented 13 years ago

I upgraded to haml 3.1.1 but it didn't fix it.
I then ran gem uninstall serve haml compass followed by gem install serve haml compass and now it works like a boss.
If the devs are still interested, here is my exact error gist 959148
thanks @sleeplessgeek

adamstac commented 13 years ago

If you are using RVM you can create a gemset for just the project you are working in to better troubleshoot gem issues. Add a .rvmrc file and something like this as it's contents rvm use ruby-1.9.2@foo.

Also, I updated my Serve Bootstrap to the latest greatest and I'm having no issues.

jlong commented 13 years ago

Ok, this is an issue. Require Sass in your config.ru and it should fix the problem.

jlong commented 13 years ago

require 'sass'

xpepermint commented 13 years ago

require 'sass' working...