firecall
firecall

Reputation: 763

Rails 3.1 CSS file loading twice?

I'm using Rails 3.1 RC. I wanted to load a CSS manually and not via the asset pipeline.

I've tried it like this and with a hand coded tag:

  <%= stylesheet_link_tag "application" %>
  <%= stylesheet_link_tag "/stylesheets/global" %>

For some reason FireBug shows me multiple get requests for the global.css file:

enter image description here

Rails bug? Me being stupid?

If anyone is wondering - I use CSSEdit a lot so couldnt work with the file inside the asset pipeline.

Upvotes: 0

Views: 1092

Answers (2)

Mattias Wadman
Mattias Wadman

Reputation: 11425

I would guess this is caused by the same problem as described in Rails 3.1 with Asset Pipeline, link_to :confirm message showing twice?.

You have precompiled assets in your development environment and <%= stylesheet_link_tag "application" %> will expand into multiple tags including each CSS file, one of them being global.css.

Upvotes: 0

house9
house9

Reputation: 20624

did you set the assets.enabled to false in config/application.rb?

# Enable the asset pipeline
config.assets.enabled = false

Upvotes: 1

Related Questions