I’ve found the easiest way to manage the config/database.yml file in a Rails + Capistrano configuration is to add the following line to your capistrano config/deploy.rb configuration file: set :linked_files, %w{config/database.yml} Then add config/database.yml to your .gitignore file. After which, add your environment’s database.yml file to the appropriate location on the remote server(s): #{deploy_to}/appname/shared/config/database.yml Where deploy_to is the deploy_to capistrano configuration setting. This way the configuration parameters are not stored [...]
Read More
After running cap production deploy:restart   Our remote Puma log would show the following: -su: bundle: command not found   However, this was an active production server, so the bundler gem existed. After logging in and attempting to run a simple command, such as: bundle exec rails console   The console would output the following: The program 'bundle' is currently not installed. You can install it by typing: sudo apt-get [...]
Read More
If you’re running into the following error attempting to deploy via Capistrano with rbenv, foreman, and upstart: -su: bundle: command not found Then, be sure to take the export and eval rbenv statements in your ~/.bashrc file and copy them to the bottom of your ~/.profile export PATH="$HOME/.rbenv/bin:$PATH" eval "$(rbenv init -)"   As this path will not be available to the user to run the necessary commands otherwise.
Read More
If you’re running a rails application with capistrano and you run into the following error: Error reading response length from authentication socket When you attempt to connect via cap, for instance > cap staging deploy Then make sure you can answer the following questions with a ‘yes’ before continuing. 1) Is my private key properly created and available on my local system. Simple configurations will generally maintain the key at: [...]
Read More