Capistrano rails app deployment without DB

156 views
Skip to first unread message

MrBa...@googlemail.com

unread,
Nov 27, 2007, 5:17:43 AM11/27/07
to Capistrano
Hello everyone,

I m an absolutely rookie ...I ve installed some days ago capistrano
via gems and I ve tried to setup my deployment with capistrano for my
little rails application.

Everything works fine so far, but unfortunetly, I am using a legacy
database and therefore cannot use the rails db migration feature.

My question is how to tell capistrano in my config file that he should
not run any db task?

I tried to remove the role :db ... line
I set role:db, ""
role:db, nil

However, the cold_deploy was nt able to finish without an error...

Any ideas?

Thanks a lot in advance

--
Volker

Andreas Wolff

unread,
Nov 27, 2007, 5:30:33 AM11/27/07
to capis...@googlegroups.com
What's the error message?

MrBa...@googlemail.com

unread,
Nov 27, 2007, 7:47:42 AM11/27/07
to Capistrano
Hi,

On Nov 27, 11:30 am, "Andreas Wolff" <rubyph...@googlemail.com> wrote:
> What's the error message?

Well, depends, for role:db, nil undefined method `match' for
nil:NilClass
for role:db, "" connection failed for: (Errno::EBADF: Bad file
descriptor - connect(2))
When removing the whole line... I get an no db role defined error.

--
Volker

Jamis Buck

unread,
Nov 27, 2007, 9:45:12 AM11/27/07
to capis...@googlegroups.com
If you are using the deploy:cold task, if expects to run migrations
and thus needs a db role. What you want is to not define a db role at
all, and then run parts of the deploy:cold task that you want,
manually, e.g.:

cap deploy:update deploy:start

You could, of course, override the deploy:cold task to suit your own
needs:

deploy.task :cold do
deploy.update
deploy.start
end

- Jamis

> --~--~---------~--~----~------------~-------~--~----~
> To unsubscribe from this group, send email to capistrano-
> unsub...@googlegroups.com
> For more options, visit this group at http://groups.google.com/
> group/capistrano
> -~----------~----~----~----~------~----~------~--~---
>

me

unread,
Nov 30, 2007, 6:00:43 PM11/30/07
to Capistrano
What exactly are all the parts of the deploy:cold task?
Are they just deploy:update and deploy:start?
Reply all
Reply to author
Forward
0 new messages