Error Compiling Asset Application.css
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error Compiling CSS Asset up vote 6 down vote favorite 2 I have been trying to deploy a Rail 3.1.1 app on CentOS 6 This is the error I am getting Error Compiling CSS Errno::ENOENT: No Such File or Directory - /var/www/vhosts/MySite/MyAPP/tmp/cache/assets/sprockets%t43t34t34t...t34t-r32r-r23.lock /usr/local/lib/ruby/1.9.1/tempfile.rb:343:in 'rmdir' I appreciate the help. ruby-on-rails css errno share|improve this question asked Feb 9 '12 at 21:27 Steffan Perry 6671714 4 Clean the cache folder and try again. Just empty the tmp/ folder –Nerian Feb 9 '12 at 21:45 add a comment| 2 Answers 2 active oldest votes up vote 21 down vote There were actually 2 problems. First the permissions were wrong. and secondly like Nerian said, you have to clear your tmp folder. To set the correct permissions chown apache.root yourapp -R chmod 755 yourapp -R To clear you tmp folder rake tmp:pids:clear rake tmp:sessions:clear rake tmp:sockets:clear rake tmp:cache:clear share|improve this answer answered Feb 15 '12 at 4:18 Steffan Perry 6671714 thanks @Steffan, solved my problem –fengd Dec 13 '12 at 9:53 Why do I not have to do this on my own computer? Is this the only way to solve it? –MichaelScaria Jan 19 '14 at 23:15 add a comment| up vote 0 down vote If you are using an Apache server you simply need to make sure the apache account www-data can make executions in the directory. chown -R www-data:www-data . service apache2 reload share|improve this answer answered Apr 18 '14 at 10:20 TechyTimo 1,80342637 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged ruby-on-rails
Sign in Pricing Blog Support Search GitHub This repository Watch 43 Star 777 Fork 105 anjlab/bootstrap-rails Code Issues 12 Pull requests 1 Projects 0 Wiki Pulse Graphs New issue Error compiling CSS asset #65 Open burtondav opened this Issue Aug 23, 2013 · 9 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 8 participants burtondav commented Aug 23, 2013 I renamed my apllication.css to application.css.scss. I added this line to it: http://stackoverflow.com/questions/9219061/error-compiling-css-asset Import twitter bootstrap @import "twitter/bootstrap"; I get: Sass::SyntaxError: File to import not found or unreadable: twitter/bootstrap. AnjLab member yury commented Aug 23, 2013 can you show your Gemfile? danil-z commented Aug 24, 2013 Hello i'm affected too here is my Gemfile source 'https://rubygems.org' ruby '2.0.0' gem 'rails', '4.0.0' gem 'sass-rails', '~> 4.0.0' gem 'uglifier', '>= 1.3.0' gem 'coffee-rails', https://github.com/anjlab/bootstrap-rails/issues/65 '~> 4.0.0' gem 'jquery-rails' gem 'turbolinks' gem 'jbuilder', '~> 1.2' gem 'cancan' gem 'devise' gem 'devise-i18n' gem 'rails-i18n' gem 'figaro' gem 'pg' gem 'rolify' gem 'simple_form', '>= 3.0.0.rc' gem 'slim', require: 'slim/translator' gem 'therubyracer', :platform=>:ruby gem 'bootstrap-sass' gem 'unicorn-rails' group :development do gem 'slim-rails' gem 'quiet_assets' gem 'capistrano' end group :development, :test do gem 'factory_girl_rails' gem 'rspec-rails' gem 'ffaker' end group :test do gem 'capybara' gem 'poltergeist' #gem 'cucumber-rails', :require=>false gem 'cucumber-rails', github: 'marnen/cucumber-rails', :require => false gem 'database_cleaner' gem 'email_spec' gem 'launchy' end gem 'meta-tags', :require => 'meta_tags' gem 'rails_admin' gem 'omniauth-vkontakte' gem 'omniauth-facebook' gem 'omniauth-odnoklassniki' gem 'gmaps4rails', github: 'blackbumer/Google-Maps-for-Rails' gem 'anjlab-bootstrap-rails', :require => 'bootstrap-rails', :github => 'anjlab/bootstrap-rails' Gemfile.lock GIT remote: git://github.com/anjlab/bootstrap-rails.git revision: 83a4ce85cdf5edb6d0dd6e51ad37e3b649576ca0 specs: anjlab-bootstrap-rails (3.0.0.2) railties (>= 3.0) sass (>= 3.2) GIT remote: git://github.com/blackbumer/Google-Maps-for-Rails.git revision: c0a8a5b71804e693788a9b59edbaf69cf5fe6b50 specs: gmaps4rails (2.0.0.pre) GIT remote: git://github.com/marnen/cucumber-rails.git revision: 0b5fc7efb0e3d1c87a488e53ee4f76131a86c660 specs: cucumber-rails (1.3.1) capybara (>= 1.1.2) cucumber (>= 1.2.0) nokogiri (>= 1.5.0) rails (>= 3.0) GEM remote: https://rubygems.org/ specs: actionmailer (4.0.0) actionpack (= 4.0.0) mail (~> 2.5.3) actionpack (4.0.0) activesupport (= 4.0.0) builder (~> 3
Sign in Pricing Blog Support Search GitHub This repository Watch 225 Star 6,887 Fork 2,539 activeadmin/activeadmin https://github.com/activeadmin/activeadmin/issues/483 Code Issues 199 Pull requests 45 Projects 0 Wiki Pulse Graphs New issue css not getting precompiled #483 Closed jrosw opened this Issue Sep 16, 2011 http://blog.yetanotherjosh.com/post/54866594539/rails-disabling-sprockets-css-js-exception · 63 comments Projects None yet Labels Support Milestone No milestone Assignees No one assigned 30 participants and others jrosw commented Sep 16, error compiling 2011 I have a standard Rails 3.1.1.rc1 application set up. The only thing I have done to this point: rails new myapp -T -d postgresql Edited gemfile to add active_admin and a few other gems Moved sass-rails out of assets group as per issue #447 Set up a very simple index page error compiling asset and set root :to => this page, which has no dynamic content migrated the database and run in development mode. Everything runs fine. Send the app over to the production server (Apache2, Passenger, Postgresql), migrate database and access the /admin At this point I get a 500 error. So checking the production log, I get ActionView::Template::Error (active_admin.css isn't precompiled): 6:
compile assets. What you probably don’t know is that Sprockets has a debugging feature which will, in the case of a asset compilation errors, hijack the css reponse and blow away your body content and replace it with a raw ruby exception dump (using body:before selectors.) This could make your whole page look something like this: Error compiling CSS asset Less::Error: yadda yah error (in /path/to/your/app/assets/stylesheets/whatever.css.less) at /var/lib/gems/1.9.1/gems/less-2.3.1/lib/less/js/lib/less/parser.js:421:31 Not very pretty. And for javascript asset compilation errors, it injects a javascript statement to throw an error with the raw exception, so it shows up in client debuggers and javascript error signal UIs. I strongly subscribe to the policy of never showing exceptions to users, not only for UX reasons, but for security reasons as exception stack traces reveal a lot. Furthermore, I’ve already done a lot of work to make sure my app renders well-designed custom error pages, and a body content hijack like this overrides that design entirely. For now, I’m fixing this with a monkey patch to Sprockets to do something reasonable instead. Add this to a new file in config/initializers, say sprockets_monkeypatch.rb: module Sprockets module Server def css_exception_response(exception) body = "/* Sprockets::Server css compilation exception */" [ 200, { "Content-Type" => "text/css;charset=utf-8", "Content-Length" => Rack::Utils.bytesize(body).to_s }, [ body ] ] end def javascript_exception_response(exception) body = "/* Sprockets::Server javascript compilation exception */" [ 200, { "Content-Type" => "application/javascript", "Content-Length" => Rack::Utils.bytesize(body).to_s }, [ body ] ] end end end Since it’s an initializer, you’ll need to restart your webserver for this to take effect. For many apps, you