Reputation: 6466
So, of course I figure this out after an hour of messing with my main SASS file and wondering why I couldn't see the changes -- but it turns out that my local host isn't paying any attention to what I'm putting in my SASS files anymore.
This comes just after having switched everything over from SCSS to SASS, and I'm 100% sure the file is just getting ignored. For kicks/proof, I deleted all the styling in my application.erb.sass file (the only one with any styling any more -- I consolidated to get to the bottom of this), then saved, then restarted the server, and it's looking as styled as ever.
This seems to be an asset pipeline issue, and since I don't really know what to do with my config files, I'll paste the relevant-seeming stuff here:
config/environments/development.rb has these lines:
# Do not compress assets
config.assets.compress = false
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require *Rails.groups(:assets => %w(development test))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
# Expands the lines which load the assets
config.assets.debug = true
config/application.rb
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
# Enable the asset pipeline
config.assets.enabled = true
config.assets.paths << "#{Rails.root}/app/assets/fonts"
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
Also, I've got "gem 'sass-rails'" in my gem file, not in any group.
Think that's all/most that's relevant. Any idea how to fix this?
Upvotes: 0
Views: 1191
Reputation: 6466
The problem seems to have been the extension on my css file (which had some embedded ruby):
erb.sass and erb.css.sass didn't work, but css.erb.sass did.
This was inexplicably stopping the file from being read, so that when I ran assets:clean/precompile, there was no css left. Before I ran that, I guess it was running my pre-compiled CSS file from before. Weird.
Apparently, these things must be compiled from the right to the left (as probably everybody but me knew), so CSS should be the type it's compiled into.
Sorry for the confusion.
Upvotes: 0