Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8374957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:03:14+00:00 2026-06-09T15:03:14+00:00

I am using Capistrano to deploy my Rails application. whenever I deploy, changes would

  • 0

I am using Capistrano to deploy my Rails application. whenever I deploy, changes would not be reflected on the browser, and I still need to restart nginx to update the site (running sudo /etc/init.d/nginx restart). I’m not really sure why but isn’t it supposed to be updated after restarting application? (using touch /app/tmp/restart.txt)

Here’s my deploy.rb

require "rvm/capistrano"
set :rvm_ruby_string, 'ruby-1.9.3-p194@app_name'
set :rvm_type, :user

require "bundler/capistrano"

set :application, "app_name"
set :user, "me"

set :deploy_to, "/home/#{user}/#{application}"
set :deploy_via, :copy

set :use_sudo, false

set :scm, :git
set :repository,  "~/Sites/#{application}/.git"
set :branch, "master"

role :web, '1.2.3.4'
role :app, '1.2.3.4'
role :db,  '1.2.3.4', :primary => true
role :db,  '1.2.3.4'

namespace :deploy do
 task :start do ; end
 task :stop do ; end
 task :restart, :roles => :app, :except => { :no_release => true } do
   run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
 end
end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:03:16+00:00Added an answer on June 9, 2026 at 3:03 pm

    I realized that the deployment setup matches
    http://coding.smashingmagazine.com/2011/06/28/setup-a-ubuntu-vps-for-hosting-ruby-on-rails-applications-2/

    When I followed this tutorial(about a year ago), I installed slightly newer versions of nginx and passenger. From what I remember, I think these newer versions prompted me to use nginx as a service when I ran any type of init.d command. (Ubuntu 10.04)

    Anyways I would switch out the code

    run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
    

    to

    run "#{sudo} service nginx #{command}"
    

    And see if that works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently deploying a Rails application using Capistrano. Cap deploy:update_code usually works just
I am using capistrano to deploy my rails application. I want to override the
I'm trying to deploy my rails application by using Passenger and Capistrano on Dreamhost.
I am trying to deploy my rails application to a server using capistrano and
So I am using Capistrano to deploy a rails application to my production server
I am using capistrano to deploy a rails application to production. Everything appears to
I'm trying to deploy the first rails application using Capistrano. I'm getting an error
I want to deploy a website the first time using Rails 3.2.1 with capistrano
I'm on ubuntu 11.10. When I need to deploy using capistrano, unless I write
I am using Capistrano to deploy a ruby on rails project. I am attempting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.