Coder Social home page Coder Social logo

Comments (17)

DavidBennettPIO avatar DavidBennettPIO commented on July 30, 2024 1

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 :)

from capistrano-unicorn.

jloosfelt avatar jloosfelt commented on July 30, 2024

Hey @sepastian, what you did is wonderful, you are in the perfect timing for me.
Except that it does not work (yet) here but maybe my config is wrong somewhere

https://gist.github.com/jloosfelt/7106348

from capistrano-unicorn.

sepastian avatar sepastian commented on July 30, 2024

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 on roles in some places, just fixed that. Could you try again?

See sepastian@ef20bc2

from capistrano-unicorn.

jloosfelt avatar jloosfelt commented on July 30, 2024

still not working, I've updated my gist
https://gist.github.com/jloosfelt/7106348

from capistrano-unicorn.

kyledecot avatar kyledecot commented on July 30, 2024

@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 issues turned on for your project.

from capistrano-unicorn.

sepastian avatar sepastian commented on July 30, 2024

Please try again, @kyledecot, issues should be turned on now.

from capistrano-unicorn.

inbeom avatar inbeom commented on July 30, 2024

@jloosfelt @kyledecot, how about using my fork? I've run it without errors on my environment.

https://github.com/inbeom/capistrano-unicorn/tree/capistrano3

from capistrano-unicorn.

emoreth avatar emoreth commented on July 30, 2024

@inbeom version worked for me as well. But not @sepastian T.T

from capistrano-unicorn.

umhan35 avatar umhan35 commented on July 30, 2024

I used @inbeom fork. I have the following code to make it work: set :unicorn_rack_env, :production in deploy/production.rb and set :unicorn_bin, 'unicorn_rails' in deploy.rb

Here is the code in Gemfil dev group: gem 'capistrano-unicorn', require: false, github: 'inbeom/capistrano-unicorn', branch: 'capistrano3'

from capistrano-unicorn.

tomafc330 avatar tomafc330 commented on July 30, 2024

I can't seem to have capistrano see the tasks after I did what @umhan35 above:

tcc@venuespot-beta:~/ba$ bundle exec cap -T
cap bundler:install                # Install the current Bundler environment
cap deploy                         # Deploy a new release
cap deploy:check                   # Check required files and directories exist
cap deploy:check:directories       # Check shared and release directories exist
cap deploy:check:linked_dirs       # Check directories to be linked exist in shared
cap deploy:check:linked_files      # Check files to be linked exist in shared
cap deploy:check:make_linked_dirs  # Check directories of files to be linked exist in shared
cap deploy:cleanup                 # Clean up old releases
cap deploy:cleanup_assets          # Cleanup expired assets
cap deploy:cleanup_rollback        # Remove and archive rolled-back release
cap deploy:compile_assets          # Compile assets
cap deploy:finished                # Finished
cap deploy:finishing               # Finish the deployment, clean up server(s)
cap deploy:finishing_rollback      # Finish the rollback, clean up server(s)
cap deploy:log_revision            # Log details of the deploy
cap deploy:migrate                 # Runs rake db:migrate if migrations are set
cap deploy:normalise_assets        # Normalise asset timestamps
cap deploy:published               # Published
cap deploy:publishing              # Publish the release
cap deploy:revert_release          # Revert to previous release timestamp
cap deploy:reverted                # Reverted
cap deploy:reverting               # Revert server(s) to previous release
cap deploy:rollback                # Rollback to previous release
cap deploy:rollback_assets         # Rollback assets
cap deploy:started                 # Started
cap deploy:starting                # Start a deployment, make sure server(s) ready
cap deploy:symlink:linked_dirs     # Symlink linked directories
cap deploy:symlink:linked_files    # Symlink linked files
cap deploy:symlink:release         # Symlink release to current
cap deploy:symlink:shared          # Symlink files and directories from shared to release
cap deploy:updated                 # Updated
cap deploy:updating                # Update server(s) by setting up a new release
cap install                        # Install Capistrano, cap install STAGES=staging,production
cap sidekiq:quiet                  # Quiet sidekiq (stop accepting new work)
cap sidekiq:restart                # Restart sidekiq
cap sidekiq:start                  # Start sidekiq
cap sidekiq:stop                   # Stop sidekiq
tcc@venuespot-beta:~/venuespot$ 

Any suggestions?

from capistrano-unicorn.

shardnit avatar shardnit commented on July 30, 2024

@tommytcchan do you have following in your project's Capfile?

require 'capistrano/unicorn'

from capistrano-unicorn.

umhan35 avatar umhan35 commented on July 30, 2024

@tommytcchan also the after deploy:restart hook

from capistrano-unicorn.

tomafc330 avatar tomafc330 commented on July 30, 2024

@nsa310 Thanks you're right.. I had require 'capistrano-unicorn instead of require capistrano/unicorn from the previous version. @umhan35 thanks

from capistrano-unicorn.

tomafc330 avatar tomafc330 commented on July 30, 2024

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.

unicorn_env        beta
unicorn_rack_env   beta

from capistrano-unicorn.

pmontrasio avatar pmontrasio commented on July 30, 2024

I managed to make cap -T show the tasks with

Gemfile:

gem 'capistrano-unicorn', require: false, github: 'inbeom/capistrano-unicorn', branch: 'capistrano3'

Capfile:

require 'capistrano/unicorn'

If I use this repository and require 'capistrano-unicorn' I get

$ bundle exec cap -T 
cap aborted!
undefined method `instance' for Capistrano::Configuration:Class
~/.rvm/gems/ruby-2.1.0@xyz/gems/capistrano-unicorn-0.1.10/lib/capistrano-unicorn/capistrano_integration.rb:224:in `<top (required)>'
~/.rvm/gems/ruby-2.1.0@xyz/gems/capistrano-unicorn-0.1.10/lib/capistrano-unicorn.rb:2:in `require'
~/.rvm/gems/ruby-2.1.0@xyz/gems/capistrano-unicorn-0.1.10/lib/capistrano-unicorn.rb:2:in `<top (required)>'
...

By the way, @inbeom please fix the README of the capistrano3 branch because it says

And load it into your deployment script config/deploy.rb:
require 'capistrano-unicorn'

Wrong file and wrong require.
I write it here because this is where google seems to direct people looking for the gem and it might be more useful here than there.

from capistrano-unicorn.

asanger avatar asanger commented on July 30, 2024

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?

from capistrano-unicorn.

pmontrasio avatar pmontrasio commented on July 30, 2024

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.
With that the tasks show up in cap -T

That said, I can't make them do any useful work. Example: cap production unicorn:start (or stop) hangs on

Command: kill -0 `cat ` > /dev/null 2>&1

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.

from capistrano-unicorn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.