-
Notifications
You must be signed in to change notification settings - Fork 269
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 assets precompile always failed though i already set rails_env to production #239
Comments
Getting the same issue for capistrano 3.14 version @mattbrictson
|
Without an error message it is hard to say what is going on. I see that the command being executed is |
@mattbrictson : Here are the complete capistrano logs
|
Hmm that is frustrating. I don't have any ideas but could you try running the command manually via SSH instead of through cap? That might make the error more apparent.
|
Same issue. capistrano-3.14.1 @mattbrictson for me this command is working properly via SSH
|
No real solution? I have the same problem for 2 days. And I can't solve |
Same issue for me. When I run command on server it finishes successfully. I check memory and CPU and all looks fine.
|
@ilp416 Did you have any luck solving yours? |
Having a similar problem with a Rails 6 app (with webpack) using capistrano 3.16 and latest cap-rails and cap-rvm. When doing the assets:precompile step, capistrano is aborting almost imediatelly without any hint on why it failed. When I am running the same command on the server inside of the release directory (~/.rvm/bin/rvm default do bundle exec rake assets:precompile), everything works without problems. Though I get a few warnings about unmet dependencies and asset size limit. echo $? returns 0. |
@obfuscoder for me what worked was to scale up the memory for the virtual machine. I am hosting it on Azure and they allowed me to scale the VM for very cheap. So I chose a higher memory tier and the precompiled ran properly. Later I scaled the VM back so I would still pay less monthly. |
I figured out my problem. Asset compilation requires yarn on my setup. Yarn was not installed system-wide, but made available via snap. As capistrano uses a non-interactive non-login shell, it did not pick up what was set up in bashrc and co. I worked around this by installing yarn with npm system-wide. Next problem after this was, that it did not pick up my environment variables (e.g. DATABASE_URL) so I had to go through sshd_config to allow setting them via .ssh/environment, which can be a security risk, but as I am owning that host and am the only one logging in there, that was the quick solution for me. |
Yep! If you |
I found solution of my trouble here koenpunt/capistrano-nvm#25 (comment) |
it said:
i already put set rails_env to production though
always failed on
Running $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
The text was updated successfully, but these errors were encountered: