Daniel,
I've taken a look at the Ruby file you attached and it does indeed have a
Ruby syntax error -- a couple of missing `end`s.
Every time you use a `do` in Ruby to start a block, you need a matching
`end` to finish it. It's standard practice to indent everything between the
`do` and `end` so you can easily tell which `end` matches which `do`.
In your `deploy.rb`:
task :sync, :roles => :web do
...
end
Likewise, when you use `if`/`then`, you'll also need an `end`.
if ... then
...
end
if stage == :production then
puts "[Error] ..."
end
In the example you posted, there's an `else` instead of an `end` (and it's
indented at the same level as the `puts` which makes it hard to spot).
Making these two changes (extra `end`, replace `else` with `end`) should
make a syntactically OK file. If you'd like help simplifying the code
itself, post back here (or try live chat with the #ruby channel on Freenode
IRC): https://webchat.freenode.net/
Hunter
On 14 February 2014 09:05, Daniel Shepherd <[email protected]>wrote:
> Hi guys, here is my tasks.rb file from a Capistrano 2 deployment.
>
> Ive tracked hacking it myself to include the extra feature at the bottom.
> Basically I want to have the two functions in db:sync but ive done
> something which is causing my deployment to say that db:make_config doesn't
> exist. So I've put "end" somewhere wrong but I'm lost as to how to sort
> this out, if anyone could have a quick look and fix it would be greatly
> appreciated.
>
>
> --
> 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 [email protected].
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/capistrano/a7d9f3bc-a5d8-4156-9dbd-449be55012a7%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
Rob Hunter
--
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 [email protected].
To view this discussion on the web, visit
https://groups.google.com/d/msgid/capistrano/CAB-gw9TQu8c%3DWu4i-tvLi%2BRSLakYDemGp3HKsGEbUKbekHxt-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.