DISQUS

The Puerto Rican Rails Dude: Capistrano - Like that person you hate, yet end up falling in love with

  • MichaelT · 2 years ago
    Great write-up. I found the information regarding the the missing 'script/spin' file helpful. Thanks ;)
  • Dave · 1 year ago
    Nice writeup. Regarding spin, I find it useful to add a task to create it rather than have it in svn.



    namespace :deploy do
    namespace :spinner do
    desc :app do
    dispatcher_type = fetch(:dispatcher_type, 'mongrel')
    dispatcher_instances = fetch(:dispatcher_instances, 3)
    dispatcher_bind_ip = fetch(:dispatcher_bind_ip, '127.0.0.1')
    dispatcher_starting_port = fetch(:dispatcher_starting_port, 8000)
    rails_env = fetch(:rails_env, 'production')

    script = 0755
    end
    end
    end


    Then, use a trigger to execute it:


    after "deploy:update_code", "deploy:spinner:write"


    Note, this is for cap 2.x.
  • Dave · 1 year ago
    The code above did not come out well. Let's try that again.


    namespace :spinner do
    desc :app do
    dispatcher_type = fetch(:dispatcher_type, 'mongrel')
    dispatcher_instances = fetch(:dispatcher_instances, 3)
    dispatcher_bind_ip = fetch(:dispatcher_bind_ip, '127.0.0.1')
    dispatcher_starting_port = fetch(:dispatcher_starting_port, 8000)
    rails_env = fetch(:rails_env, 'production')

    script = 0755
    end
    end
  • Dennis Martinez · 1 year ago
    Hi Dave,

    Thanks for that snippet. It does sound better having Capistrano take care of the spinner script rather than keeping it in the repository. I'm sure I'll find it very valuable when deploying my upcoming project. Thanks!
  • harbans · 1 year ago
    hello friends, iam looking for an answer of my question regarding deploying of ror app on different servers. Question is that : can we deploy our app on different servers without using capistrano? How much work and what type of work have to be done to deploy such app?
    i will be thankful to you.
  • harbans · 1 year ago
    Hello ,

    My previous seminar went well. Now I have an another query, if you help me in this also.
    As there is a concept of remoting in .net,
    is this possible to deploy the components in ROR and to make these components communicate with each other as done in remoting concept?
    Is this possible in ROR?
    Please guide me.

    Thanks
    Harbans