Updating Rails App with Phusion Passenger and Nginx
up vote
0
down vote
favorite
I have a Rails app served via Phusion Passenger and Nginx. I made some changes to both the server and the client side code, recompiled the production assets with bundle exec rake assets:precompile RAILS_ENV=production, and attempted to restart both nginx and phusion with the following:
# stop then restart nginx
sudo kill $(cat /opt/nginx/logs/nginx.pid)
sudo /opt/nginx/sbin/nginx
# restart passenger
passenger-config restart-app
However, when I clear my browser cache and rerequest my host address, I see phusion and nginx are still serving the old JavaScript assets, rather than the JS assets I just compiled.
How can I stop then restart the rails server and serve the updated server and client side code? Any help others can offer on this question would be greatly appreciated.
ruby-on-rails nginx server passenger phusion
add a comment |
up vote
0
down vote
favorite
I have a Rails app served via Phusion Passenger and Nginx. I made some changes to both the server and the client side code, recompiled the production assets with bundle exec rake assets:precompile RAILS_ENV=production, and attempted to restart both nginx and phusion with the following:
# stop then restart nginx
sudo kill $(cat /opt/nginx/logs/nginx.pid)
sudo /opt/nginx/sbin/nginx
# restart passenger
passenger-config restart-app
However, when I clear my browser cache and rerequest my host address, I see phusion and nginx are still serving the old JavaScript assets, rather than the JS assets I just compiled.
How can I stop then restart the rails server and serve the updated server and client side code? Any help others can offer on this question would be greatly appreciated.
ruby-on-rails nginx server passenger phusion
how does your production.rb file looks like?
– Julien
Nov 8 at 22:02
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a Rails app served via Phusion Passenger and Nginx. I made some changes to both the server and the client side code, recompiled the production assets with bundle exec rake assets:precompile RAILS_ENV=production, and attempted to restart both nginx and phusion with the following:
# stop then restart nginx
sudo kill $(cat /opt/nginx/logs/nginx.pid)
sudo /opt/nginx/sbin/nginx
# restart passenger
passenger-config restart-app
However, when I clear my browser cache and rerequest my host address, I see phusion and nginx are still serving the old JavaScript assets, rather than the JS assets I just compiled.
How can I stop then restart the rails server and serve the updated server and client side code? Any help others can offer on this question would be greatly appreciated.
ruby-on-rails nginx server passenger phusion
I have a Rails app served via Phusion Passenger and Nginx. I made some changes to both the server and the client side code, recompiled the production assets with bundle exec rake assets:precompile RAILS_ENV=production, and attempted to restart both nginx and phusion with the following:
# stop then restart nginx
sudo kill $(cat /opt/nginx/logs/nginx.pid)
sudo /opt/nginx/sbin/nginx
# restart passenger
passenger-config restart-app
However, when I clear my browser cache and rerequest my host address, I see phusion and nginx are still serving the old JavaScript assets, rather than the JS assets I just compiled.
How can I stop then restart the rails server and serve the updated server and client side code? Any help others can offer on this question would be greatly appreciated.
ruby-on-rails nginx server passenger phusion
ruby-on-rails nginx server passenger phusion
asked Nov 8 at 21:38
duhaime
8,14945278
8,14945278
how does your production.rb file looks like?
– Julien
Nov 8 at 22:02
add a comment |
how does your production.rb file looks like?
– Julien
Nov 8 at 22:02
how does your production.rb file looks like?
– Julien
Nov 8 at 22:02
how does your production.rb file looks like?
– Julien
Nov 8 at 22:02
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
It turned out my server had two versions of nginx installed. I needed to restart the version of nginx hosting my app with:
sudo /etc/rc.d/init.d/nginx restart
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
It turned out my server had two versions of nginx installed. I needed to restart the version of nginx hosting my app with:
sudo /etc/rc.d/init.d/nginx restart
add a comment |
up vote
0
down vote
accepted
It turned out my server had two versions of nginx installed. I needed to restart the version of nginx hosting my app with:
sudo /etc/rc.d/init.d/nginx restart
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
It turned out my server had two versions of nginx installed. I needed to restart the version of nginx hosting my app with:
sudo /etc/rc.d/init.d/nginx restart
It turned out my server had two versions of nginx installed. I needed to restart the version of nginx hosting my app with:
sudo /etc/rc.d/init.d/nginx restart
answered Nov 8 at 23:26
duhaime
8,14945278
8,14945278
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53216526%2fupdating-rails-app-with-phusion-passenger-and-nginx%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
how does your production.rb file looks like?
– Julien
Nov 8 at 22:02