Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No such file or directory in capistrano deploy

Tags:

Here is the error when doing cap deploy:

*** [err :: 11.15.19.46] find: `/var/www/emclab/releases/20111208184942/public/images' *** [err :: 11.15.19.46] : No such file or directory *** [err :: 11.15.19.46] find: `/var/www/emclab/releases/20111208184942/public/stylesheets': No such file or directory *** [err :: 11.15.19.46] find: `/var/www/emclab/releases/20111208184942/public/javascripts' *** [err :: 11.15.19.46] : No such file or directory 

Any thoughts what causes the error? thanks.

like image 555
user938363 Avatar asked Dec 08 '11 19:12

user938363


2 Answers

I assume you updated to rails 3.1

I run in same problem recently. Solution:

Add this line to deploy.rb

set :normalize_asset_timestamps, false 

In fact this question is duplication of: Capistrano and deployment of a website from Github

only post it because found it on google quite high and this one has not got answer

like image 62
Piotr Mąsior Avatar answered Dec 10 '22 18:12

Piotr Mąsior


I struggled with this problem also.

Assuming you are using Rails 3.1, the answer is on this webpage: http://guides.rubyonrails.org/asset_pipeline.html

The short answer is your assets (imgs, js, css) haven't been compiled for deployment to production. You can either compile them manually with this command.

bundle exec rake assets:precompile 

Or you can uncomment this line from your Capfile:

load 'deploy/assets' 

Or you can set your production environment to compile the assets in production, but I found that solution just created more problems and would recommend the two suggestions above.

like image 20
Lacy Avatar answered Dec 10 '22 19:12

Lacy