Foro de elhacker.net

Programación => Scripting => Mensaje iniciado por: General Dmitry Vergadoski en 26 Mayo 2015, 15:01 pm



Título: duda como hacer deploy ruby on rails
Publicado por: General Dmitry Vergadoski en 26 Mayo 2015, 15:01 pm
hola amigos, soy nuevo en ruby on rails, tengo mi aplicacion hecha funciona con mysql, ahora lo que quiero es que ruby me genere el codigo para yo poder subirlo a mi servidor apache, creo que para hacer eso hay que hacer un deploy para ello tengo la gema 'capistrano-rails' instalada por defecto en mi ruby ya que use railsinstaller para instalar el ruby on rails en mi windows 7, entonces lo configuro asi:

primero ejecuto el comando:

cap install STAGES=production

despues configuro:

\deploy\production.rb

Código:
server 'localhost:80', user: 'root', roles: %w{app db web}, user:"root", password: "123"

\config\deploy.rb

Código:
lock '3.4.0'

set :application, 'sistema'

set :deploy_to, '/var/www/sistema'

namespace :deploy do

  after :restart, :clear_cache do
    on roles(:web), in: :groups, limit: 3, wait: 10 do
    end
  end

end

despues ejecuto:

cap production deploy

y me manda el siguiente error:

INFO [044989ea] Running /usr/bin/env mkdir -p /tmp/sistema/ as root@localhost
DEBUG [044989ea] Command: /usr/bin/env mkdir -p /tmp/sistema/
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as root@localhost: conne
ction closed by remote host

Net::SSH::Disconnect: connection closed by remote host

EOFError: end of file reached

Tasks: TOP => git:check => git:wrapper
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as root@localhost
: connection closed by remote host

muchas gracias de antemano.