Capistrano problem in Amazon Web Service - ruby-on-rails

I'm running Rails + Passenger under an Ubuntu AWS's instance. Now I'm trying to deploy with Capistrano, I already did my git repository (and upload it to the server) and my deploy.rb file (with capify .). I already runned cap deploy:setup and cap deploy:check with success. But now when I try to run cap deploy it fail and I get this error http://pastebin.com/uzkerA9F

Well, I found the problem and solution here
Capistrano asks for password when deploying, despite SSH keys
So > I add set :ssh_options, {:forward_agent => true} to my deploy.rb file

Related

Authentication issue in Cap production deploy

Issue
(Backtrace restricted to imported tasks) cap aborted!
Net::SSH::AuthenticationFailed: Authentication failed for user
user#xxyy
Tasks: TOP => rvm:check (See full trace by running task with --trace)
I am following this tutorial to deploy rails app into my ec2 instance and am at the step where I key in cap production deploy
I have tried the solutions in this post, but am unable to resolve the situation.
Also, I have checked to ensure that my .pem file is located in the .ssh folder in my home directory. I am able to manually ssh into my ec2 instance.
How do I overcome the error above?
Notes:
1) Content of my production.rb
server 'xx.yyy.zz', user: 'abc', roles: %w{web app db}
2) net-ssh version is 3.1.1. I did not specify this gem in my Gemfile, but still found it from Gemfile.lock.

Cap production deploy failed error: could not locate gemfile on AWS server

I am deploying a rails app on a AWS ec2 instance through Capistrano.
Cap production deploy:check is successful, but when I am running cap production deploy I get an error.
Can anyone help?
I found the problem. Your Gemfile in the project was named "gemfile" SMALL g
It must be Gemfile.
So the thing run on Mac and Windows. But when you deploy to Linux, it does not see the Gemfile.Please rename the "gemfile" in your project to "Gemfile"
It will work.

Capistrano Nginx Rails, After Rake Db:Migrate "Something went wrong"

I needed to migrate my database, so I made the changes to my local system, pushed them to git, then cap production deploy. Once on the service I went to the current and ran rake db:migrate. Now when I visit my site I receive an error We're sorry, but something went wrong (500). There is no other information and my /opt/nginx/logs/error.log is completely blank. How do I fix this?
I'm using Postgresql, capistrano, rails 3, nginx
If you correctly installed ruby, rails, passenger and nginx, then follow my gist. You should go through the files and change the configuration according to your need. Here, you'll find
Gemfile // required gems for capistrano deployment
Capfile
deploy.rb // change the configuration for your server
production.rb // change the configuration for your server
After fully configured according to the gist, run
cap production deploy:check # it'll tell you what is missing for deploying your application
then, cap production deploy
Always check the production.log file if you facing any problem.

Using Capistrano to deploy a rails app

I am new to Capistrano and this is my first attempt using it to deploy my rails application. I believe I have my config/deploy.rb setup properly, but before I do
cap production deploy:setup
I want to make sure that no harm will happen to my database. The database for this project is already set and has data in it. I could not figure out if doing
cap production deploy:setup
will destroy my production database and re-create it as an empty DB. Opinions?
cap deploy:setup
When you run this command, Capistrano will SSH to your server, enter
the directory that you specified in the deploy_to variable, and create
a special directory structure that’s required for Capistrano to work
properly. If something is wrong with the permissions or SSH access,
you will get error messages. Look closely at the output Capistrano
gives you while the command is running.
This command will do nothing with your database.

Can't find production.log file in my server

I am deploying a rails app to EC2 using capistrano and it all works fine.
Except that I cannot find a production.log or staging.log file in the shared folder.
I already ran
$ cap deploy:setup
$ cap deploy:check
$ cap deploy
And they both work fine.
When I ssh in my instance the log folder in my_application/current/log is empty
Any idea?
Thanks
Ok I solved it by simply removing all my app on the server and running
cap deploy:setup
My application was owned by the root user and could not write anything in the log file

Resources