Coder Social home page Coder Social logo

Comments (8)

TalkingQuickly avatar TalkingQuickly commented on July 23, 2024

Could you post your deploy.rb and production.rb files?
On 1 Jul 2014 05:05, "jljohnstone" [email protected] wrote:

When I run cap production deploy:setup_config and watch the debug
messages, none of the symlinks are being created properly as the value for
:full_app_name is omitted. For example, the debug message for the
unicorn_init.sh symlink is:

Running /usr/bin/env sudo ln -nfs
/home/deploy/apps/myapp_production/shared/config/unicorn_init.sh
/etc/init.d/unicorn_ on www.mydomain.com

Rather than the expected:

Running /usr/bin/env sudo ln -nfs
/home/deploy/apps/myapp_production/shared/config/unicorn_init.sh
/etc/init.d/unicorn_myapp_production on www.mydomain.com


Reply to this email directly or view it on GitHub
#19.

from capistrano-3-rails-template.

jljohnstone avatar jljohnstone commented on July 23, 2024

Here's my deploy.rb and production.rb.

from capistrano-3-rails-template.

TalkingQuickly avatar TalkingQuickly commented on July 23, 2024

Hey, problem is that at the point where you've got:

link: "/etc/nginx/sites-enabled/#{fetch(:full_app_name)}"

full_app_name hasn't yet been defined because it's defined in the stage file not in deploy.rb. If you look at the example one below:

https://github.com/TalkingQuickly/capistrano-3-rails-template/blob/master/config/deploy.rb

it uses the format link: "/etc/init.d/unicorn_{{full_app_name}}" which uses {{var}} to interpolate the values once the stage file has been loaded. Checkout https://github.com/TalkingQuickly/capistrano-3-rails-template/blob/master/lib/capistrano/substitute_strings.rb for the logic for this which is used by https://github.com/TalkingQuickly/capistrano-3-rails-template/blob/master/lib/capistrano/tasks/setup_config.cap

Cheers,

Ben

from capistrano-3-rails-template.

jljohnstone avatar jljohnstone commented on July 23, 2024

Thanks Ben. I'm sure this will get me back on track.

Does this mean the code on pages 108 and 115 of your "Reliably Deploying Rails Applications" book is slightly off?

from capistrano-3-rails-template.

TalkingQuickly avatar TalkingQuickly commented on July 23, 2024

Hey @jljohnstone you're totally right, somehow that code excerpt has got out of sync with the file its based on, really appreciate you pointing that out, will get it fixed today or tomorrow and a new version of the book released! Cheers, Ben.

from capistrano-3-rails-template.

jljohnstone avatar jljohnstone commented on July 23, 2024

No problem, Ben. Thanks for your help.

from capistrano-3-rails-template.

adimasuhid avatar adimasuhid commented on July 23, 2024

Hi Ben,

Just to add, this blog post needs to be updated as well. http://www.talkingquickly.co.uk/2014/01/deploying-rails-apps-to-a-vps-with-capistrano-v3/

Cheers!

from capistrano-3-rails-template.

TalkingQuickly avatar TalkingQuickly commented on July 23, 2024

Many thanks, I'll get that updated!

Ben Dixon

+44 (0)2 032 894 803
+33 (0)7 81 83 27 78
http://www.twitter.com/TalkingQuickly
http://www.talkingquickly.co.uk

Dxnx Ltd Trading as Hills Bede
UK Registered Company Number: 6751002

Registered Address:
DXNX LTD
Techhub @ Google Campus
4 - 5 Bonhill Street
London
EC2A 4BX

On 17 July 2014 09:36, Ace Dimasuhid [email protected] wrote:

Hi Ben,

Just to add, this blog post needs to be updated as well.
http://www.talkingquickly.co.uk/2014/01/deploying-rails-apps-to-a-vps-with-capistrano-v3/

Cheers!


Reply to this email directly or view it on GitHub
#19 (comment)
.

from capistrano-3-rails-template.

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.