rake aborted! No such file or directory after write admin.css

I deploy rails code to EC2 using Capistrano

But I met same problems while run

cd -- /home/stage_deployer/urbox/releases/20140306102215 && RAILS_ENV=staging RAILS_GROUPS=assets bundle exec rake assets:precompile 

Below is the command I debug at EC2

stage_deployer@ip-172-31-5-59:~/urbox/releases/test$ RAILS_ENV=staging RAILS_GROUPS=assets 

Below are the log

bundle exec rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
I, [2014-03-06T10:33:54.388029 #11702]  INFO -- : ** [Raven] Raven 0.6.0 ready to catch errors
AssetSync: using /home/stage_deployer/test/releases/test/config/initializers/asset_sync.rb
** Execute assets:precompile
...
...
I, [2014-03-06T10:34:04.551896 #11702]  INFO -- : Writing /home/stage_deployer/urbox/releases/test/public/assets/admin.js
I, [2014-03-06T10:34:04.553847 #11702]  INFO -- : Writing /home/stage_deployer/urbox/releases/test/public/assets/application.js
I, [2014-03-06T10:34:04.554514 #11702]  INFO -- : Writing /home/stage_deployer/urbox/releases/test/public/assets/ckeditor/config.js
I, [2014-03-06T10:34:04.554819 #11702]  INFO -- : Writing /home/stage_deployer/urbox/releases/test/public/assets/admin.css
rake aborted!
No such file or directory - /home/stage_deployer/urbox/releases/test/public/assets/admin-c503a9b1f76de48a2717d7ff8581fe74.css
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/fileutils.rb:1551:in `stat'
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/fileutils.rb:1551:in `block in fu_each_src_dest'
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/fileutils.rb:1567:in `fu_each_src_dest0'
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/fileutils.rb:1549:in `fu_each_src_dest'
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/fileutils.rb:393:in `cp'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/non-stupid-digest-assets-1.0.0/lib/non-stupid-digest-assets.rb:10:in `block in compile_with_non_digest'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/non-stupid-digest-assets-1.0.0/lib/non-stupid-digest-assets.rb:6:in `each'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/non-stupid-digest-assets-1.0.0/lib/non-stupid-digest-assets.rb:6:in `compile_with_non_digest'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:60:in `block (3 levels) in define'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.1/lib/rake/sprocketstask.rb:146:in `with_logger'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:59:in `block (2 levels) in define'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:236:in `call'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:236:in `block in execute'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:231:in `each'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:231:in `execute'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:168:in `invoke_with_call_chain'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:161:in `invoke'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:149:in `invoke_task'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:106:in `each'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:106:in `block in top_level'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:115:in `run_with_threads'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:100:in `top_level'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:78:in `block in run'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/bin/rake:23:in `load'
/home/stage_deployer/urbox/shared/bundle/ruby/2.0.0/bin/rake:23:in `<main>'
Tasks: TOP => assets:precompile

This problem is happened after I try to add some resource of crumble.js under vender/stylesheets/crumble/grumble.min.css and vender/stylesheets/crumble/crumble.css

grumble.min.css https://github.com/tommoor/crumble/blob/master/css/grumble.min.css crumble.css https://github.com/tommoor/crumble/blob/master/css/crumble.css

Please help me~~

I try to run

rake assets:precompile 

in local machine, but no occur any problems

here is my admin.css

/*
 *= require twitter/bootstrap
 *= require select2
 *= require bootstrap-editable
 *= require unicorn.main
 *= require unicorn.grey
 *= require jquery.ui.datepicker
 *= require_self
*/

.sortable-item {
  background: white;
  border-radius: 5px;
  border: 1px solid #b5b5b5;
  border-bottom-width: 2px;
  background-image: none;
  margin: 0 0 3px 0;
  padding: 0;
  cursor: pointer;
  padding: 8px 8px 8px 30px;
  list-style: none;
}

td.center { text-align: center; }

Answers


You should update your non-stupid-asset-digest gem.

It's at version 1.0.4 now and has better error handling around the case where there are missing files. This will allow you to get your site up.

Once you're up and running, then you can look at the logs/file system and investigate why some of the digests aren't being generated.

Let me know whether this helps.


Need Your Help

How to load next row on button click event using C# and SQL?

c# sql button picturebox sqldatareader

I have a PictureBox where images are retrieve from an SQL database. What I'm trying to do is to load the next image on the click event of next button.

Add Header and Footer for PDF using iTextsharp

c# asp.net itextsharp

How can I add header and footer for each page in the pdf.