Reverting back to sass-rails
v3.2.5 appeared to fix the problem.
How to include SASS files using sass-rails gem with the Asset Pipeline in Rails 3.2.15? Operation not supported?
-
29-07-2022 - |
Question
I'm trying to figure out the best practise way to serve my (SASS) CSS assets. I've googled and googled and now my mind is boggled!
Rails 3.2.15
Gemfile:
# Asset pipeline
group :assets do
gem 'sass-rails', '3.2.6'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '2.3.0'
end
production.rb
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
# Compress JavaScripts and CSS
config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false
# Generate digests for assets URLs
config.assets.digest = true
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
config.assets.precompile += %w( *.js *.css )
# Choose which compressors to use
# config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :scss
application.css.scss
/*
*= require data_tables
*= require data_tables_colvis
*= require styles
*= require jquery.ui.autocomplete
*= require jquery.ui.datepicker
*= require jquery.ui.slider
*= require timepicker
*= stub email
*= require_directory
*/
.ui-widget,
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button { font-family: inherit; font-size: inherit; }
Note, some of the files i require
are in app/assets/stylesheets
while others are in vendor/assets/stylesheets
Commands run
rm -rf tmp/
rm -rf public/assets/
bundle exec rake assets:clean RAILS_ENV=production --trace
bundle exec rake assets:precompile RAILS_ENV=production --trace
Error encountered
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
Operation not supported - (/media/shared/code/user/appname/tmp/cache/sass/21e55874b33b09754ee1326254c109e623619141/application.css.scssc20131108-41651-yzw3cr, /media/shared/code/user/appname/tmp/cache/sass/21e55874b33b09754ee1326254c109e623619141/application.css.scssc)
(in /media/shared/code/user/appname/app/assets/stylesheets/application.css.scss)
/usr/lib/ruby/gems/1.9.1/gems/sass-3.2.12/lib/sass/util.rb:886:in `rename'
/usr/lib/ruby/gems/1.9.1/gems/sass-3.2.12/lib/sass/util.rb:886:in `atomic_create_and_write_file'
The trailing c
on the temp file path seems slightly suspicious to me?
Any ideas what's going on? What is the 'right' way to do this?
Thanks
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow