Ad-hoc task doesnt run remotely

10 views
Skip to first unread message

Frank Laszlo

unread,
Jul 20, 2016, 4:29:02 PM7/20/16
to Capistrano
Versions:
  • Ruby 2.3.1p112
  • Capistrano 3.5.0
  • Rake 10.5.0
Platform:
  • Ubuntu 16.04
  • CentOS 7
Logs:
It appears as though the task I've built isnt even trying to use the roles, even though I have "on" defined (the :app and :db roles are defined in production.rb), Everything works fine if I include the task as part of my normal deploy, but I want to be able to run it on demand ad-hoc. When the task runs, it complains about the file not existing when it does get_creds, but I see nothing about where its running at, which makes me believe its running locally. The file should not exist locally as its only on the app server.

Any ideas? Thanks

-Frank

Frank Laszlo

unread,
Jul 20, 2016, 4:30:07 PM7/20/16
to Capistrano
Disregard this. I was able to figure it out. Ruby functions like File.read for example will not work within on() blocks.

Lee Hambley

unread,
Jul 20, 2016, 4:30:22 PM7/20/16
to Capistrano
Line 21 reads a local file.

--
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 capistrano+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/58e4a527-2bbb-4df6-ab76-3a6e45058658%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages