-
Notifications
You must be signed in to change notification settings - Fork 44
Description
FWIW I'm using the jasoncodes fork. I'm not sure if this is a hassle issue or a smart_asset issue, but posting it here for now.
I'm attempting to package all my javascript and stylesheets using the smart_asset gem. I've configured smart_asset (config/assets.yml) as:
stylesheets:
base:
- application
# Public directory
public: public
# Package destination directory (within the public directory)
destination:
javascripts: ../tmp/hassle/javascripts
stylesheets: ../tmp/hassle/stylesheets
#Asset source directories (within the public directory)
sources:
javascripts: javascripts
stylesheets: ../tmp/hassle/stylesheets # reads css from here, because that's where hassle has generated them
Then I refer to the css in my layout with:
<head>
<%= stylesheet_link_merged :base %>
</head>
In my local dev environment (Rails.env = development) (not even on Heroku), the css is not loaded correctly by hassle. The generated html looks like:
<link href="/../tmp/hassle/stylesheets/application.css?1278175454930356" media="screen" rel="stylesheet" />
Which causes:
ActionController::RoutingError (No route matches "/tmp/hassle/stylesheets/application.css"):
Even though the file is located there. If I attempt to change the smart_asset config to find css source in stylesheets (which is where it needs to be for stylesheet_link_merged :base to create a link tag that hassle can recognize, it can't find the css source to build the package. Rails.env production doesn't load the css either from the packaged css file.
Seems like a catch-22 situation.