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

Error appears while assets are copied #12

Open
SmyzerT opened this issue Oct 27, 2015 · 4 comments
Open

Error appears while assets are copied #12

SmyzerT opened this issue Oct 27, 2015 · 4 comments

Comments

@SmyzerT
Copy link
Contributor

SmyzerT commented Oct 27, 2015

this https://github.com/capistrano-plugins/capistrano-faster-assets/blob/master/lib/capistrano/tasks/faster_assets.rake#L45 triggers error, because capistrano/rails creates symlink to public/assets and the task creates endless loop copy

@rhomeister
Copy link
Contributor

I've never seen this problem before. Do you have an idea why this is happening in your specific case?

@SmyzerT
Copy link
Contributor Author

SmyzerT commented Oct 28, 2015

I think in my case it happens because capistrano/rails creates a symlink release/timestamp/public/assets -> shared/public/assets, so previous release and current release refers to the same assets folder. I think that we don't need to execute a line which invoke assets copying, because we have symlink to the right assets and we just need to invoke copying if we don't have any symlink (but we have the symlink because this gem depends to capistrano/rails which creates the symlink)

off topic note

I think it would be better to add capistrano/rails as dependency to your gem via http://guides.rubygems.org/specification-reference/#add_runtime_dependency and create some rake task like rake faster-assets install which will automatically add required line into the Capfile

@rhomeister
Copy link
Contributor

Strangely enough, I have never experienced this problem, and I'm also using
capistrano-rails. So I'm trying to figure out what is going wrong in your
specific case.

On 28 October 2015 at 09:15, SmyzerT [email protected] wrote:

I think in my case it happens because capistrano/rails creates a symlink
release/timestamp/public/assets -> shared/public/assets, so previous
release and current release refers to the same assets folder. I think that
we don't need to execute a line which invoke assets copying, because we
have symlink to the right assets and we just need to invoke copying if we
don't have any symlink (but we have the symlink because this gem depends to
capistrano/rails which creates the symlink)
off topic note

I think it would be better to add capistrano/rails as dependency to your
gem via
http://guides.rubygems.org/specification-reference/#add_runtime_dependency
and create some rake task like rake faster-assets install which will
automatically add required line into the Capfile


Reply to this email directly or view it on GitHub
#12 (comment)
.

@elik-ru
Copy link

elik-ru commented Dec 23, 2015

I confirm the same problem

Problem line is here:

execute(:cp, '-r', latest_release_path.join('public', fetch(:assets_prefix)), release_path.join('public', fetch(:assets_prefix)))

because both paths are symlinks to shared/public/assets

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

3 participants