Can't disable asset pipeline #2991

Closed
kuinak opened this Issue Sep 12, 2011 · 6 comments

Comments

Projects
None yet
4 participants

kuinak commented Sep 12, 2011

If I create a new rails 3.1 app and set

config.assets.enabled = false

in my application.rb, when I try to start up my rails server in development mode, I get the following error:

The sass-rails plugin requires the asset pipeline to be enabled.

Is there a way to turn off asset pipeline and have sass work?

Owner

guilleiguaran commented Sep 13, 2011

Replacing sass-rails with sass in your Gemfile doesn't works?

Owner

guilleiguaran commented Sep 13, 2011

Looks like is intentional: guilleiguaran/sass-rails@74c5e4e

Contributor

chriseppstein commented Sep 13, 2011

sass-rails is glue code that connects sass to rails via the asset pipeline. We didn't imagine a use case where the asset pipeline was disabled but sass-rails was installed. The preferred solution here is to remove sass-rails from your bundle (or you can run bundle install —without assets).

If these are not acceptable solutions, please provide details about your use case.

Contributor

chriseppstein commented Sep 13, 2011

If you prefer to use the Sass library's rack plugin with rails, you should just use the sass gem directly without sass-rails installed.

spastorino closed this Sep 13, 2011

kuinak commented Sep 13, 2011

That solution is fine. However, the fact that you can change a simple boolean flag and hose your app seems like fail to me. The documentation for sass-rails says that "This gem provides official integration for ruby on rails projects with the Sass stylesheet language." This could be confusing if they someone wants to use sass, but not the asset pipeline. Perhaps the documentation or exception message could be clearer.

Contributor

chriseppstein commented Sep 13, 2011

I expressed similar concerns to @spastorino. Please submit a patch to the docs that you feel would have helped you.

Hunt & pecked on my iPhone... Sorry if it's brief!

On Sep 13, 2011, at 9:41 AM, Evanreply@reply.github.com wrote:

That solution is fine. However, the fact that you can change a simple boolean flag and hose your app seems like fail to me. The documentation for sass-rails says that "This gem provides official integration for ruby on rails projects with the Sass stylesheet language." This could be confusing if they someone wants to use sass, but not the asset pipeline. Perhaps the documentation or exception message could be clearer.

Reply to this email directly or view it on GitHub:
#2991 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment