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 7545917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:03:42+00:00 2026-05-30T09:03:42+00:00

I am trying to deploy a helloworld site from my local machine to a

  • 0

I am trying to deploy a helloworld site from my local machine to a server. I have installed Ruby, Rails and Capistrano. After having a recipe I type this “cap deploy:setup” command and get following error

/usr/lib/ruby/1.8/capistrano/configuration/variables.rb:122:in
method_missing': undefined local variable or methodprimary’ for

(NameError) from ./config/deploy.rb:19:in `load’ from

/usr/lib/ruby/1.8/capistrano/configuration/loading.rb:172:in
load_from_file' from
/usr/lib/ruby/1.8/capistrano/configuration/loading.rb:89:in
load’
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in
load' from
/usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in
each’
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in
load' from Capfile:4:inload’ from
/usr/lib/ruby/1.8/capistrano/configuration/loading.rb:172:in
load_from_file' from
/usr/lib/ruby/1.8/capistrano/configuration/loading.rb:89:in
load’
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in
load' from
/usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in
each’
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in
load' from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:64:in
load_recipes’ from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:64:in
each' from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:64:in
load_recipes’ from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:30:in
execute!' from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:14:in
execute’ from /usr/bin/cap:4

Following is my deploy.rb file contents.

set :application, "testapp"
set :repository,  "<url of git repo>"
set :deploy_to, "var/www/html/testapp"
set :document_root, "var/www/html/testapp/current"

set :scm, :git
set :scm_username, "MyUserName"
set :scm_password, "MyPassword"
set :scm_checkout, "clone"
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`

set :user, "<server's user name>"
set :password, "<server's password>"
set :use_sudo, false
set :ssh_options, {:forward_agent => true}

role :web, "<server's IP>"                          # Your HTTP server, Apache/etc
role :app, "<server's IP>"                          # This may be the same as your `Web` server
role :db,  "<server's IP>", primary => true # This is where Rails migrations will run

# If you are using Passenger mod_rails uncomment this:
# if you're still using the script/reapear helper you will need
# these http://github.com/rails/irs_process_scripts

# namespace :deploy do
#   task :start {}
#   task :stop {}
#   task :restart, :roles => :app, :except => { :no_release => true } do
#     run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
#   end
# end
namespace :deploy do
    task :update do
        transaction do
            update_code
            symlink
        end
    end

    task :finalize_update do
        transaction do          
        end
    end

    task :symlink do
        transaction do
            run "ln -nfs #{current_release} #{deploy_to}/#{current_dir}"
            run "ln -nfs #{deploy_to}/#{current_dir} #{document_root}"
        end
    end

    task :migrate do
    end

    task :restart do
    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-05-30T09:03:43+00:00Added an answer on May 30, 2026 at 9:03 am
     role :db,  "<server's IP>", primary => true
    

    Should be

     role :db,  "<server's IP>", :primary => true
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to deploy my spring application in a server machine which having
I am trying to deploy my Ruby on Rails application on Media Temple. The
I'm trying to deploy an application to Heroku after upgrading to Rails 3.1 with
I'm trying to deploy a simple skeleton Rails 3.0.5 (and Ruby 1.9.2) app to
I am trying to deploy rails website on ec2 using capistrano, everything works flawlessly
I'm trying to deploy my Rails 3.0 app. I use rvm and ruby 1.9.2
Hi I am trying to deploy an application using webstart. I have a requirement
I am trying to deploy a test ASP.NET MVC site to a site hosted
I am trying to deploy a WAR on the mentioned tomcat application server. However
I am trying to deploy a simple rails application to an heroku account, I

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.