Hello to all! I am getting following error while running cap deploy in terminal. $ cap deploy * executing `deploy'' * executing `deploy:update'' ** transaction: start * executing `deploy:update_code'' executing locally: "git ls-remote git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git master" command finished in 4912ms * executing "git clone -q git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git /u/apps/mysite/releases/20121008150536 && cd /u/apps/mysite/releases/20121008150536 && git checkout -q -b deploy d8c68e8142039f19b36669692144825715bc129a && (echo d8c68e8142039f19b36669692144825715bc129a > /u/apps/mysite/releases/20121008150536/REVISION)" servers: ["simak"] Password: [simak] executing command ** [simak :: out] fatal: could not create work tree dir ''/u/apps/mysite/releases/20121008150536''.: Permission denied command finished in 240ms *** [deploy:update_code] rolling back * executing "rm -rf /u/apps/mysite/releases/20121008150536; true" servers: ["simak"] [simak] executing command command finished in 9ms failed: "sh -c ''git clone -q git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git /u/apps/mysite/releases/20121008150536 && cd /u/apps/mysite/releases/20121008150536 && git checkout -q -b deploy d8c68e8142039f19b36669692144825715bc129a && (echo d8c68e8142039f19b36669692144825715bc129a > /u/apps/mysite/releases/20121008150536/REVISION)''" on simak I also gave permissions to this application but still having same error. Please help me to solve this error. -- Mandeep Kaur http://mandeepsimak.wordpress.com/ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
It cannot create /u/apps/mysite/releases/20121008150536 because the permissions are wrong. Start at /u/apps/mysite and work down checking the permissions -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On Mon, Oct 8, 2012 at 8:52 PM, Peter Hickman <peterhickman386-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> It cannot create /u/apps/mysite/releases/20121008150536 because the > permissions are wrong. Start at /u/apps/mysite and work down checking > the permissions >Ok. Now I am getting following error: $ cap deploy * executing `deploy'' * executing `deploy:update'' ** transaction: start * executing `deploy:update_code'' updating the cached checkout on all servers executing locally: "git ls-remote git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git master" command finished in 7283ms * executing "if [ -d ~/public_html/mysite/shared/cached-copy ]; then cd ~/public_html/mysite/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard d8c68e8142039f19b36669692144825715bc129a && git clean -q -d -x -f; else git clone -q git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git ~/public_html/mysite/shared/cached-copy && cd ~/public_html/mysite/shared/cached-copy && git checkout -q -b deploy d8c68e8142039f19b36669692144825715bc129a; fi" servers: ["simak"] Password: [simak] executing command ** [simak :: out] Permission denied (publickey). ** fatal: The remote end hung up unexpectedly command finished in 3211ms *** [deploy:update_code] rolling back * executing "rm -rf ~/public_html/mysite/releases/20121008152314; true" servers: ["simak"] [simak] executing command command finished in 10ms failed: "sh -c ''if [ -d ~/public_html/mysite/shared/cached-copy ]; then cd ~/public_html/mysite/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard d8c68e8142039f19b36669692144825715bc129a && git clean -q -d -x -f; else git clone -q git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git ~/public_html/mysite/shared/cached-copy && cd ~/public_html/mysite/shared/cached-copy && git checkout -q -b deploy d8c68e8142039f19b36669692144825715bc129a; fi''" on simak And Cap deploy:setup works without any error. Check its result: cap deploy:setup * executing `deploy:setup'' * executing "mkdir -p ~/public_html/mysite ~/public_html/mysite/releases ~/public_html/mysite/shared ~/public_html/mysite/shared/system ~/public_html/mysite/shared/log ~/public_html/mysite/shared/pids" servers: ["simak"] Password: [simak] executing command command finished in 237ms * executing "chmod g+w ~/public_html/mysite ~/public_html/mysite/releases ~/public_html/mysite/shared ~/public_html/mysite/shared/system ~/public_html/mysite/shared/log ~/public_html/mysite/shared/pids" servers: ["simak"] [simak] executing command command finished in 10ms -- Mandeep Kaur http://mandeepsimak.wordpress.com/ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Try this in your deploy.rb ssh_options[:forward_agent] = true default_run_options[:pty] = true понедельник, 8 октября 2012 г., 18:18:39 UTC+3 пользователь Mandy написал:> > Hello to all! > > I am getting following error while running cap deploy in terminal. > > $ cap deploy > * executing `deploy'' > * executing `deploy:update'' > ** transaction: start > * executing `deploy:update_code'' > executing locally: "git ls-remote git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git > master" > command finished in 4912ms > * executing "git clone -q git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git > /u/apps/mysite/releases/20121008150536 && cd > /u/apps/mysite/releases/20121008150536 && git checkout -q -b deploy > d8c68e8142039f19b36669692144825715bc129a && (echo > d8c68e8142039f19b36669692144825715bc129a > > /u/apps/mysite/releases/20121008150536/REVISION)" > servers: ["simak"] > Password: > [simak] executing command > ** [simak :: out] fatal: could not create work tree dir > ''/u/apps/mysite/releases/20121008150536''.: Permission denied > command finished in 240ms > *** [deploy:update_code] rolling back > * executing "rm -rf /u/apps/mysite/releases/20121008150536; true" > servers: ["simak"] > [simak] executing command > command finished in 9ms > failed: "sh -c ''git clone -q git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git > /u/apps/mysite/releases/20121008150536 && cd > /u/apps/mysite/releases/20121008150536 && git checkout -q -b deploy > d8c68e8142039f19b36669692144825715bc129a && (echo > d8c68e8142039f19b36669692144825715bc129a > > /u/apps/mysite/releases/20121008150536/REVISION)''" on simak > > I also gave permissions to this application but still having same error. > Please help me to solve this error. > > > -- > Mandeep Kaur > http://mandeepsimak.wordpress.com/ >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/cx_aStpl0_YJ. For more options, visit https://groups.google.com/groups/opt_out.
On Mon, Oct 8, 2012 at 8:58 PM, Ilia Bylich <ibylich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Try this in your deploy.rb > > ssh_options[:forward_agent] = true > default_run_options[:pty] = true >Now it give result without error. Check its o/p below signature. But my application is not started. I got following error when I open domain(simak) in browser. Is there any step to start rails app with capistrano which i was missing? -- Mandeep Kaur http://mandeepsimak.wordpress.com/ ---------------------------------------------------------------------------------- $ cap deploy * executing `deploy'' * executing `deploy:update'' ** transaction: start * executing `deploy:update_code'' updating the cached checkout on all servers executing locally: "git ls-remote git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git master" command finished in 5377ms * executing "if [ -d ~/public_html/mysite/shared/cached-copy ]; then cd ~/public_html/mysite/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard d8c68e8142039f19b36669692144825715bc129a && git clean -q -d -x -f; else git clone -q git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git ~/public_html/mysite/shared/cached-copy && cd ~/public_html/mysite/shared/cached-copy && git checkout -q -b deploy d8c68e8142039f19b36669692144825715bc129a; fi" servers: ["simak"] Password: [simak] executing command command finished in 6903ms copying the cached version to ~/public_html/mysite/releases/20121008153222 * executing "cp -RPp ~/public_html/mysite/shared/cached-copy ~/public_html/mysite/releases/20121008153222 && (echo d8c68e8142039f19b36669692144825715bc129a > ~/public_html/mysite/releases/20121008153222/REVISION)" servers: ["simak"] [simak] executing command command finished in 24ms * executing `deploy:finalize_update'' * executing "chmod -R g+w ~/public_html/mysite/releases/20121008153222" servers: ["simak"] [simak] executing command command finished in 12ms * executing "rm -rf ~/public_html/mysite/releases/20121008153222/public/system && mkdir -p ~/public_html/mysite/releases/20121008153222/public/" servers: ["simak"] [simak] executing command command finished in 11ms * executing "ln -s ~/public_html/mysite/shared/system ~/public_html/mysite/releases/20121008153222/public/system" servers: ["simak"] [simak] executing command command finished in 9ms * executing "rm -rf ~/public_html/mysite/releases/20121008153222/log" servers: ["simak"] [simak] executing command command finished in 10ms * executing "ln -s ~/public_html/mysite/shared/log ~/public_html/mysite/releases/20121008153222/log" servers: ["simak"] [simak] executing command command finished in 9ms * executing "rm -rf ~/public_html/mysite/releases/20121008153222/tmp/pids && mkdir -p ~/public_html/mysite/releases/20121008153222/tmp/" servers: ["simak"] [simak] executing command command finished in 11ms * executing "ln -s ~/public_html/mysite/shared/pids ~/public_html/mysite/releases/20121008153222/tmp/pids" servers: ["simak"] [simak] executing command command finished in 9ms * executing "find ~/public_html/mysite/releases/20121008153222/public/images ~/public_html/mysite/releases/20121008153222/public/stylesheets ~/public_html/mysite/releases/20121008153222/public/javascripts -exec touch -t 201210081532.22 {} '';''; true" servers: ["simak"] [simak] executing command ** [out :: simak] find: `/home/mandy/public_html/mysite/releases/20121008153222/public/images'': No such file or directory ** [out :: simak] find: `/home/mandy/public_html/mysite/releases/20121008153222/public/stylesheets'': No such file or directory ** [out :: simak] find: `/home/mandy/public_html/mysite/releases/20121008153222/public/javascripts'': No such file or directory command finished in 13ms * executing `deploy:create_symlink'' * executing "rm -f ~/public_html/mysite/current && ln -s ~/public_html/mysite/releases/20121008153222 ~/public_html/mysite/current" servers: ["simak"] [simak] executing command command finished in 11ms ** transaction: commit * executing `deploy:restart'' -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
As you can see, your task `deploy:restart` is empty. You should restart your web server (like unicorn or passenger) in this task. You can define it like this namespace :deploy do desc "Restart Unicorn" task :restart do run "if [ -f #{unicorn_pid} ] && [ -e /proc/$(cat #{unicorn_pid}) ]; then kill -USR2 `cat #{unicorn_pid}`; else cd #{release_path} && bundle exec unicorn_rails -c #{unicorn_conf} -E #{rails_env} -D; fi" end end Or just try to find this recipe in google :) понедельник, 8 октября 2012 г., 18:18:39 UTC+3 пользователь Mandy написал:> > Hello to all! > > I am getting following error while running cap deploy in terminal. > > $ cap deploy > * executing `deploy'' > * executing `deploy:update'' > ** transaction: start > * executing `deploy:update_code'' > executing locally: "git ls-remote git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git > master" > command finished in 4912ms > * executing "git clone -q git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git > /u/apps/mysite/releases/20121008150536 && cd > /u/apps/mysite/releases/20121008150536 && git checkout -q -b deploy > d8c68e8142039f19b36669692144825715bc129a && (echo > d8c68e8142039f19b36669692144825715bc129a > > /u/apps/mysite/releases/20121008150536/REVISION)" > servers: ["simak"] > Password: > [simak] executing command > ** [simak :: out] fatal: could not create work tree dir > ''/u/apps/mysite/releases/20121008150536''.: Permission denied > command finished in 240ms > *** [deploy:update_code] rolling back > * executing "rm -rf /u/apps/mysite/releases/20121008150536; true" > servers: ["simak"] > [simak] executing command > command finished in 9ms > failed: "sh -c ''git clone -q git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git > /u/apps/mysite/releases/20121008150536 && cd > /u/apps/mysite/releases/20121008150536 && git checkout -q -b deploy > d8c68e8142039f19b36669692144825715bc129a && (echo > d8c68e8142039f19b36669692144825715bc129a > > /u/apps/mysite/releases/20121008150536/REVISION)''" on simak > > I also gave permissions to this application but still having same error. > Please help me to solve this error. > > > -- > Mandeep Kaur > http://mandeepsimak.wordpress.com/ >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/gGnmYaJPkt0J. For more options, visit https://groups.google.com/groups/opt_out.
On Mon, Oct 8, 2012 at 9:24 PM, Ilia Bylich <ibylich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> As you can see, your task `deploy:restart` is empty. You should restart your > web server (like unicorn or passenger) in this task. You can define it like > this > > namespace :deploy do > desc "Restart Unicorn" > task :restart do > run "if [ -f #{unicorn_pid} ] && [ -e /proc/$(cat #{unicorn_pid}) ]; > then kill -USR2 `cat #{unicorn_pid}`; else cd #{release_path} && bundle exec > unicorn_rails -c #{unicorn_conf} -E #{rails_env} -D; fi" > end > endI have used passenger and write namespace for that but still having same result in browser. "We''re sorry, but something went wrong." -- Mandeep Kaur http://mandeepsimak.wordpress.com/ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
This page means error in rails. Look at your log/production.log. понедельник, 8 октября 2012 г., 18:18:39 UTC+3 пользователь Mandy написал:> > Hello to all! > > I am getting following error while running cap deploy in terminal. > > $ cap deploy > * executing `deploy'' > * executing `deploy:update'' > ** transaction: start > * executing `deploy:update_code'' > executing locally: "git ls-remote git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git > master" > command finished in 4912ms > * executing "git clone -q git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git > /u/apps/mysite/releases/20121008150536 && cd > /u/apps/mysite/releases/20121008150536 && git checkout -q -b deploy > d8c68e8142039f19b36669692144825715bc129a && (echo > d8c68e8142039f19b36669692144825715bc129a > > /u/apps/mysite/releases/20121008150536/REVISION)" > servers: ["simak"] > Password: > [simak] executing command > ** [simak :: out] fatal: could not create work tree dir > ''/u/apps/mysite/releases/20121008150536''.: Permission denied > command finished in 240ms > *** [deploy:update_code] rolling back > * executing "rm -rf /u/apps/mysite/releases/20121008150536; true" > servers: ["simak"] > [simak] executing command > command finished in 9ms > failed: "sh -c ''git clone -q git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:megha55/mysite.git > /u/apps/mysite/releases/20121008150536 && cd > /u/apps/mysite/releases/20121008150536 && git checkout -q -b deploy > d8c68e8142039f19b36669692144825715bc129a && (echo > d8c68e8142039f19b36669692144825715bc129a > > /u/apps/mysite/releases/20121008150536/REVISION)''" on simak > > I also gave permissions to this application but still having same error. > Please help me to solve this error. > > > -- > Mandeep Kaur > http://mandeepsimak.wordpress.com/ >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/EMd3zasFm-kJ. For more options, visit https://groups.google.com/groups/opt_out.
On Mon, Oct 8, 2012 at 9:51 PM, Ilia Bylich <ibylich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> This page means error in rails. Look at your log/production.log. >this file has following error; Mysql2::Error (Access denied for user ''root''@''localhost'' (using password: NO)): And when i run cap deploy:migrations the i got following error: failed: "sh -c ''cd ~/public_html/mysite/releases/20121008162802 && rake RAILS_ENV=production db:migrate''" on simak Now what i have to do? -- Mandeep Kaur http://mandeepsimak.wordpress.com/ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On Mon, Oct 8, 2012 at 9:58 PM, Mandeep Kaur <meghasimak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Mon, Oct 8, 2012 at 9:51 PM, Ilia Bylich <ibylich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> This page means error in rails. Look at your log/production.log. >> > > this file has following error; > Mysql2::Error (Access denied for user ''root''@''localhost'' (using password: NO)): > > And when i run cap deploy:migrations the i got following error: > > failed: "sh -c ''cd ~/public_html/mysite/releases/20121008162802 && > rake RAILS_ENV=production db:migrate''" on simak >I have also tried to login to mysql and it works. database.yml file was also correct. Now please tell me where''s the problem. -- Mandeep Kaur http://mandeepsimak.wordpress.com/ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On Mon, Oct 8, 2012 at 10:22 PM, Mandeep Kaur <meghasimak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Mon, Oct 8, 2012 at 9:58 PM, Mandeep Kaur <meghasimak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> On Mon, Oct 8, 2012 at 9:51 PM, Ilia Bylich <ibylich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> This page means error in rails. Look at your log/production.log. >>> >> >> this file has following error; >> Mysql2::Error (Access denied for user ''root''@''localhost'' (using password: NO)): >>Now cap deploy:migrations command works fine. but still browser shows same message. and production.log has mysql error. -- Mandeep Kaur http://mandeepsimak.wordpress.com/ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Thanks to all for helping me. Problem Solved : ). -- Mandeep Kaur http://mandeepsimak.wordpress.com/ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.