<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Masaya Nasu</title>
    <description>The latest articles on DEV Community by Masaya Nasu (@nasum).</description>
    <link>https://dev.to/nasum</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F41843%2Ffc910ed4-574a-4019-80cd-e1aa30de26c0.png</url>
      <title>DEV Community: Masaya Nasu</title>
      <link>https://dev.to/nasum</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nasum"/>
    <language>en</language>
    <item>
      <title>Order of task execution when deploying Rails application in capistrano</title>
      <dc:creator>Masaya Nasu</dc:creator>
      <pubDate>Sat, 06 Jan 2018 06:29:13 +0000</pubDate>
      <link>https://dev.to/nasum/order-of-task-execution-when-deploying-rails-application-in-capistrano-217b</link>
      <guid>https://dev.to/nasum/order-of-task-execution-when-deploying-rails-application-in-capistrano-217b</guid>
      <description>&lt;p&gt;Check the difference between when you using Rails plugin in capistrano and when it is not.&lt;/p&gt;

&lt;p&gt;The gem related to Capistrano is the following.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;capistrano-rails&lt;/li&gt;
&lt;li&gt;capistrano-rbenv&lt;/li&gt;
&lt;li&gt;capistrano-bundler&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I think those gem is general when using Rails.&lt;/p&gt;

&lt;p&gt;The difference in task execution order is as follows.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="err"&gt;**&lt;/span&gt; Invoke production (first_time)                               ** Invoke production (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute production                                           ** Execute production
&lt;span class="err"&gt;**&lt;/span&gt; Invoke load:defaults (first_time)                            ** Invoke load:defaults (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute load:defaults                                        ** Execute load:defaults
                                                              &amp;gt; ** Invoke rbenv:validate (first_time)
                                                              &amp;gt; ** Execute rbenv:validate
                                                              &amp;gt; ** Invoke rbenv:map_bins (first_time)
                                                              &amp;gt; ** Execute rbenv:map_bins
                                                              &amp;gt; ** Invoke bundler:map_bins (first_time)
                                                              &amp;gt; ** Execute bundler:map_bins
                                                              &amp;gt; ** Invoke deploy:set_rails_env (first_time)
                                                              &amp;gt; ** Execute deploy:set_rails_env
                                                              &amp;gt; ** Invoke deploy:set_linked_dirs (first_time)
                                                              &amp;gt; ** Execute deploy:set_linked_dirs
                                                              &amp;gt; ** Invoke deploy:set_rails_env
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy (first_time)                                   ** Invoke deploy (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy                                               ** Execute deploy
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:starting (first_time)                          ** Invoke deploy:starting (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:starting                                      ** Execute deploy:starting
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:check (first_time)                             ** Invoke deploy:check (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Invoke git:check (first_time)                                ** Invoke git:check (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Invoke git:wrapper (first_time)                              ** Invoke git:wrapper (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute git:wrapper                                          ** Execute git:wrapper
&lt;span class="err"&gt;**&lt;/span&gt; Execute git:check                                            ** Execute git:check
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:check                                         ** Execute deploy:check
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:check:directories (first_time)                 ** Invoke deploy:check:directories (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:check:directories                             ** Execute deploy:check:directories
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:check:linked_dirs (first_time)                 ** Invoke deploy:check:linked_dirs (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:check:linked_dirs                             ** Execute deploy:check:linked_dirs
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:check:make_linked_dirs (first_time)            ** Invoke deploy:check:make_linked_dirs (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:check:make_linked_dirs                        ** Execute deploy:check:make_linked_dirs
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:check:linked_files (first_time)                ** Invoke deploy:check:linked_files (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:check:linked_files                            ** Execute deploy:check:linked_files
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:set_previous_revision (first_time)             ** Invoke deploy:set_previous_revision (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:set_previous_revision                         ** Execute deploy:set_previous_revision
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:started (first_time)                           ** Invoke deploy:started (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:started                                       ** Execute deploy:started
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:updating (first_time)                          ** Invoke deploy:updating (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:new_release_path (first_time)                  ** Invoke deploy:new_release_path (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:new_release_path                              ** Execute deploy:new_release_path
&lt;span class="err"&gt;**&lt;/span&gt; Invoke git:create_release (first_time)                       ** Invoke git:create_release (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Invoke git:update (first_time)                               ** Invoke git:update (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Invoke git:clone (first_time)                                ** Invoke git:clone (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Invoke git:wrapper                                           ** Invoke git:wrapper
&lt;span class="err"&gt;**&lt;/span&gt; Execute git:clone                                            ** Execute git:clone
&lt;span class="err"&gt;**&lt;/span&gt; Execute git:update                                           ** Execute git:update
&lt;span class="err"&gt;**&lt;/span&gt; Execute git:create_release                                   ** Execute git:create_release
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:updating                                      ** Execute deploy:updating
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:set_current_revision (first_time)              ** Invoke deploy:set_current_revision (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Invoke git:set_current_revision (first_time)                 ** Invoke git:set_current_revision (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute git:set_current_revision                             ** Execute git:set_current_revision
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:set_current_revision                          ** Execute deploy:set_current_revision
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:symlink:shared (first_time)                    ** Invoke deploy:symlink:shared (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:symlink:shared                                ** Execute deploy:symlink:shared
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:symlink:linked_files (first_time)              ** Invoke deploy:symlink:linked_files (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:symlink:linked_files                          ** Execute deploy:symlink:linked_files
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:symlink:linked_dirs (first_time)               ** Invoke deploy:symlink:linked_dirs (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:symlink:linked_dirs                           ** Execute deploy:symlink:linked_dirs
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:updated (first_time)                           ** Invoke deploy:updated (first_time)
                                                              &amp;gt; ** Invoke bundler:install (first_time)
                                                              &amp;gt; ** Execute bundler:install
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:updated                                       ** Execute deploy:updated
                                                              &amp;gt; ** Invoke deploy:compile_assets (first_time)
                                                              &amp;gt; ** Invoke deploy:set_rails_env
                                                              &amp;gt; ** Execute deploy:compile_assets
                                                              &amp;gt; ** Invoke deploy:assets:precompile (first_time)
                                                              &amp;gt; ** Execute deploy:assets:precompile
                                                              &amp;gt; ** Invoke deploy:assets:backup_manifest (first_time)
                                                              &amp;gt; ** Execute deploy:assets:backup_manifest
                                                              &amp;gt; ** Invoke deploy:cleanup_assets (first_time)
                                                              &amp;gt; ** Invoke deploy:set_rails_env
                                                              &amp;gt; ** Execute deploy:cleanup_assets
                                                              &amp;gt; ** Invoke deploy:normalize_assets (first_time)
                                                              &amp;gt; ** Invoke deploy:set_rails_env
                                                              &amp;gt; ** Execute deploy:normalize_assets
                                                              &amp;gt; ** Invoke deploy:migrate (first_time)
                                                              &amp;gt; ** Invoke deploy:set_rails_env
                                                              &amp;gt; ** Execute deploy:migrate
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:publishing (first_time)                        ** Invoke deploy:publishing (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:publishing                                    ** Execute deploy:publishing
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:symlink:release (first_time)                   ** Invoke deploy:symlink:release (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:symlink:release                               ** Execute deploy:symlink:release
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:published (first_time)                         ** Invoke deploy:published (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:published                                     ** Execute deploy:published
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:finishing (first_time)                         ** Invoke deploy:finishing (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:finishing                                     ** Execute deploy:finishing
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:cleanup (first_time)                           ** Invoke deploy:cleanup (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:cleanup                                       ** Execute deploy:cleanup
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:finished (first_time)                          ** Invoke deploy:finished (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:finished                                      ** Execute deploy:finished
&lt;span class="err"&gt;**&lt;/span&gt; Invoke deploy:log_revision (first_time)                      ** Invoke deploy:log_revision (first_time)
&lt;span class="err"&gt;**&lt;/span&gt; Execute deploy:log_revision                                  ** Execute deploy:log_revision
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can see that precompile and migration are added.&lt;/p&gt;

</description>
      <category>capistrano</category>
      <category>rails</category>
    </item>
  </channel>
</rss>
