Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy:normalize_assets, 'No such file or directory' #184

Closed
ghost opened this issue Sep 8, 2016 · 3 comments
Closed

deploy:normalize_assets, 'No such file or directory' #184

ghost opened this issue Sep 8, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Sep 8, 2016

I use capistrano-rails (1.1.7) on OS X 10.11.6 deploying my Rails app to a Ubuntu server (14.04.4 LTS).

In config/deploy.rb, I set normalize_asset_timestamps with an array

set :normalize_asset_timestamps, %w{public/assets public/images}

When I run cap deploy:normalize_assets, I get the following warning

00:00 deploy:normalize_assets
      01 find ["public/assets,", "public/images"] -exec touch -t 201609080234.52 {} ';'; true
      01 find: `[public/assets,,': No such file or directory
      01 find: `public/images]': No such file or directory

I run find public/assets public/images -exec touch -t 201609080234.52 {} ';'; true on the Ubuntu server and it succeeds.

It seems to be caused by string interpolation with Array

# lib/capistrano/tasks/assets.rake#L15
execute :find, "#{assets} -exec touch -t #{asset_timestamp} {} ';'; true"
@ghost ghost changed the title deploy:normalize_assets 'No such file or directory' deploy:normalize_assets, 'No such file or directory' Sep 8, 2016
@will-in-wi
Copy link
Contributor

As an experiment, could you try

set :normalize_asset_timestamps, %w{public/assets, public/images}.join(' ')

@ghost
Copy link
Author

ghost commented Sep 8, 2016

@will-in-wi Yes, it works.

# config/deploy.rb
set :normalize_asset_timestamps, %w{public/assets public/images}.join(' ')

The join method returns a string "public/assets public/images" so it works well with string interpolation.

00:00 deploy:normalize_assets
      01 find public/assets public/images -exec touch -t 201609080445.58 {} ';'; true

@mattbrictson
Copy link
Member

Fixed by #185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants