Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<h3>First, move <code>database.yml</code> to a template file.</h3> <p>If you're on Git:</p> <pre><code>git mv config/database.yml config/database.yml.example git commit -m "moved database.yml to an example file" </code></pre> <p>Or, if you're on Subversion:</p> <pre><code>svn move config/database.yml config/database.yml.example svn ci -m "moved database.yml to an example file" </code></pre> <h3>Second, ignore the .yml version.</h3> <p>If you're on Git:</p> <pre><code>cat &gt; .gitignore config/database.yml git add .gitignore git commit -m "ignored database.yml" </code></pre> <p>If you're on Subversion:</p> <pre><code>svn propset svn:ignore config "database.yml" </code></pre> <h3>Third, install <a href="http://github.com/technicalpickles/wheres-your-database-yml-dude" rel="noreferrer">Where's your database.yml, dude?</a>:</h3> <pre><code>script/plugin install git://github.com/technicalpickles/wheres-your-database-yml-dude </code></pre> <p>That plugin alerts developers before any Rake tasks are run if they haven't created their own local version of <code>config/database.yml</code>.</p> <h3>Fourth, set up a Capistrano deploy task:</h3> <pre><code># in RAILS_ROOT/config/deploy.rb: after 'deploy:update_code', 'deploy:symlink_db' namespace :deploy do desc "Symlinks the database.yml" task :symlink_db, :roles =&gt; :app do run "ln -nfs #{deploy_to}/shared/config/database.yml #{release_path}/config/database.yml" end end </code></pre> <h3>Fifth, upload the server's version of database.yml:</h3> <pre><code>scp config/database.yml user@my_server.com:/path_to_rails_app/shared/config/database.yml </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload