-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
capistrano-unicorn with capistrano 3.x #82
Comments
Hey @sepastian, what you did is wonderful, you are in the perfect timing for me. |
Hi @jloosfelt, thanks for trying. Obviously, this is still at a very early stage and I am still quite new to Capistrano myself. I think I forgot to update the syntax for |
still not working, I've updated my gist |
@sepastian I'm attempting to use your forked version but I've run into an issue. I was going to submit an issue for it but it appears that you don't have |
Please try again, @kyledecot, issues should be turned on now. |
@jloosfelt @kyledecot, how about using my fork? I've run it without errors on my environment. https://github.com/inbeom/capistrano-unicorn/tree/capistrano3 |
@inbeom version worked for me as well. But not @sepastian T.T |
I used @inbeom fork. I have the following code to make it work: Here is the code in Gemfil dev group: |
I can't seem to have capistrano see the tasks after I did what @umhan35 above:
Any suggestions? |
@tommytcchan do you have following in your project's Capfile? require 'capistrano/unicorn' |
@tommytcchan also the |
@nsa310 Thanks you're right.. I had |
Just an FYI, it seems that both unicorn_env and unicorn_rack_env vars have to be set if it's deploying to something other than production.
|
I managed to make cap -T show the tasks with Gemfile:
Capfile:
If I use this repository and require 'capistrano-unicorn' I get
By the way, @inbeom please fix the README of the capistrano3 branch because it says
Wrong file and wrong require. |
Interesting. Using the forked repo from above, I run into an error saying that it can't load 'capistrano-unicorn'. Is this now working properly for you? |
It works with the settings at the top of my comment. The big difference between @inbeom 's repository and this one is that for the former we must require capistrano/unicorn and not capistrano-unicorn. That said, I can't make them do any useful work. Example: cap production unicorn:start (or stop) hangs on
which probably means that there is a shell variable evaluated to an empty string, but that's a different story and worth of a different issue if I can understand what's going on. |
just as a note, I have been using this with capistrano 3.1 https://github.com/tablexi/capistrano3-unicorn Working well for me so far :) |
Hi, I have rewritten
capistrano-unicorn
to work with capistrano 3.x, check out sepastian-capistrano-unicorn.This is still in an early stage and not at all tested; but I can use it to deploy my projects with capistrano 3.x. Some changes I made:
The
run
command is no longer available; instead,execute
(SSHKit) must be used.One issue with that was multiline (here-doc) scripts, as used in
capistrano-unicorn
. Commands will be sanitized by SSHKit before execution. During sanitization, all line breaks will be replaced with semicolons. This, in turn, renders some shell scripts invalid. To overcome this, I didscript.split.join(' ')
.Capistrano 3.x defines a special tasks for loading default settings, namely
load:defaults
. See also Add a task to load defaults capistrano/capistrano#605. So the contents ofconfig.rb
is now incapistrano/tasks/unicorn.cap
, inside theload:defaults
task.In Capistrano 3.x,
set
does no longer accept a block. Instead, a Proc must be specified. Soset :abc { ... }
becomesset :abc, Proc.new{ ... }
.defer
no longer exists in Capistrano 3.x.Could you please have a look at this? What are you plans for supporting capistrano 3.x? Thoughts? How about creating a new branch for capistrano 3.x support?
The text was updated successfully, but these errors were encountered: