But I can log in with the credentials through SSH, does it mean, that I 
miss something in the deploy.rb/staging.rb file?

On Monday, June 2, 2014 7:46:45 PM UTC+2, Lee Hambley wrote:
>
> Your staging server is unreachable.
>
> Lee Hambley
> --
> http://lee.hambley.name/
> +49 (0) 170 298 5667
>
>
> On 2 June 2014 18:21, R <rdu...@gmail.com <javascript:>> wrote:
>
>>  Hello guys,
>>
>> I am trying to set up Capistrano 3 for my Rails 4 application, the setup 
>> is following:
>>
>> deploy.rb
>>
>> ---
>>
>>> SSHKit.config.command_map[:rake] = "bundle exec rake"
>>> # config valid only for Capistrano 3.1
>>> lock '3.1.0'
>>>  set :application, 'myapp'
>>> set :scm, :git set
>>>  set :repo_url, 'g...@bitbucket.org:username/repo.git'
>>> set :stages, ["staging", "production"]
>>> set :default_stage, "staging"
>>>  set :format, :pretty set
>>> set :pty, true
>>> set :keep_releases, 5
>>>  namespace :deploy do
>>>  desc 'Restart application'
>>>  task :restart do
>>>  on roles(:app), in: :sequence, wait: 5 do
>>>  # Your restart mechanism here, for example:
>>>  # execute :touch, release_path.join('tmp/restart.txt')
>>>  end
>>>  end
>>>  after :publishing, :restart after
>>>  after :restart, :clear_cache do
>>>  on roles(:web), in: :groups, limit: 3, wait: 10 do
>>>  # Here we can do anything such as:
>>>  # within release_path do
>>>  # execute :rake, 'cache:clear'
>>>  # end
>>>  end
>>>  end
>>
>>
>>
>> and in deploy/staging.rb:
>>
>>> role :app, %w{deployer@IP_ADDRESS}
>>> role :web, %w{deployer@IP_ADDRESS}
>>> role :db,  %w{deployer@IP_ADDRESS}server "IP_ADDRESS", user: 'deployer', 
>>> roles: %w{app web db}
>>> set :deploy_to, "/home/deployer/apps/myapp-staging"set :ssh_options, {
>>>     forward_agent: false,
>>>     auth_methods: %w(password),
>>>     password: 'my_password',
>>>     user: 'deployer',
>>> }
>>
>>
>>
>> When I run
>>
>>> cap staging deploy 
>>
>>
>> I get:
>>>  INFO [f15d031b] Running /usr/bin/env mkdir -p /tmp/myapp/ on IP_ADDRESS
>>> DEBUG 
>>> DEBUG [f15d031b] Command: /usr/bin/env mkdir -p /tmp/myapp/
>>> cap aborted!
>>> Errno::ECONNREFUSED: Connection refused - connect(2) 
>>
>>
>>
>> Why Capistrano can't deploy the app on the staging server?
>> Thank you in advance for every help. 
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Capistrano" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to capistrano+...@googlegroups.com <javascript:>.
>> To view this discussion on the web, visit 
>> https://groups.google.com/d/msgid/capistrano/2fbc6b53-7114-4ef8-8239-07dd779a2cf5%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/capistrano/2fbc6b53-7114-4ef8-8239-07dd779a2cf5%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capistrano+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/0ff224bb-d697-4eb0-9aa2-614c73e88ac2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to