RailsCasts Episode #377: Trinidad
Requires Ruby 1.9.2 or higher.
Commands used in this episode
ssh email@example.com adduser deployer echo "deployer ALL=(ALL:ALL) ALL" >> /etc/sudoers exit ssh-copy-id firstname.lastname@example.org cap deploy:install cap deploy:setup cap deploy:cold bundle exec rails s trinidad -e production cap nginx:setup cap trinidad:setup touch tmp/restart.txt cap deploy trinidad:restart
Highline Version: If you are using JRuby 1.7 and receiving the exception
NameError: cannot load Java class jline.ConsoleReaderwhile running Capistrano commands then try running
bundle update highline. This was fixed in Highline version to 1.6.14. See this issue for details.
SSH Agent Forwarding: If Capistrano hangs while deploying, check to see if the
ssh_options[:forward_agent] = trueis in the Capistrano config. This may not work as discussed here. Here are some solutions.
Authorize the server directly by generating an SSH key and setting it up as the deploy key.
Consider running Capistrano commands from Ruby MRI on your local.
Use an alternative deployment method such as "copy"
Try upgrading to JRuby 7 on your local machine, this has been reported to solve the issue but I have not tested it.
Not Reloading: I experienced an issue where running
touch tmp/restart.txton the server would not use the latest code. Unfortunately I was unable to reproduce this problem consistently enough to resolve it. If you experience this, please comment on this issue.