You are not logged in.

#1 2007-05-12 16:49:05

recipher
Member
Registered: 2007-05-12
Posts: 7

Capistrano Issues

Hi.  I'm new to Rails and I'm having a few issues with Capistrano.  I understand how it works but my lack of knowledge of the *nix command line is letting me down a bit (I've moved over from .NET).

If I run cap deploy, then it fails on the restart (I've set :use_sudo to false) when I get a permission denied on reaper.    The exact error is

bash: /home/{user}/webapps/{app}/current/script/process/reaper: Permission Denied

If I try to cap migrate or cap deploy_with_migrations then I get a different error

Cannot find gem for Rails ~>1.2.3.0

And it tells me to install the missing gem or change environment.rb (I've done this but no play).

Any ideas?

Thanks, Johnny

Offline

 

#2 2007-05-12 17:14:38

IAIHMB
Member
From: Hudson, Florida.
Registered: 2006-09-19
Posts: 1362

Re: Capistrano Issues

Note that Rails isn't installed on our servers it's installed with each application of type Rails in ~/webapps/(Application Name)/vendor/ so if you've replaced the original ~/webapps/(Application Name)/vendor/ with your own you will need to install Rails.

After lunch I'll see if I can't get Capistrano to cooperate. smile


-David Sissitka

Offline

 

#3 2007-05-12 23:30:10

IAIHMB
Member
From: Hudson, Florida.
Registered: 2006-09-19
Posts: 1362

Re: Capistrano Issues

Just a bit of an update. I'm going to have to install Capistrano on a virtual machine to deploy from because it's not playing well with Windows right now regardless of which version of Ruby I use. (I've tried 1.8.4, 1.8.5, and 1.8.6.)


-David Sissitka

Offline

 

#4 2007-05-13 08:10:14

recipher
Member
Registered: 2007-05-12
Posts: 7

Re: Capistrano Issues

I'm plugging away.  At the moment, I've rewritten the restart and spinner tasks to use restart and start mongrel, rather than FastCGI.

That now fails because mongrel_rails complains about there being no log/mongrel.pid.  I can't get mongrel_rails to do anything inside and SSH session manually either.

Offline

 

#5 2007-05-13 08:33:35

recipher
Member
Registered: 2007-05-12
Posts: 7

Re: Capistrano Issues

Even if I create an empty mongrel.pid file inside log, it doesn't make any difference (assuming that would work), since the update_code task deletes the log directory anyway.

I've got cap migrate working, and it seems all that matters now is this mongrel restart issue.

I've also got cap update_code working, on it's own.  Am I right in thinking that the symlinked current directory becomes the working directory, or should all the site files be in the root?  The documentation doesn't make clear.

Offline

 

#6 2007-05-13 08:44:52

recipher
Member
Registered: 2007-05-12
Posts: 7

Re: Capistrano Issues

I can't get mongrel_rails to do anything.  My autostart.cgi fails with

Path to docroot not valid: public

Is this to do with the fact that there's no code in my root?

Please excuse my ignorance on these matters.  I'm a fast learner though wink

Thanks.

Offline

 

#7 2007-05-13 09:07:04

recipher
Member
Registered: 2007-05-12
Posts: 7

Re: Capistrano Issues

Ah, so a bit of poking about and I find that I have to setup RAILS_ROOT to point to current.  I see instructions for FastCGI but I can't find out what I need to do for mongrel.

Offline

 

#8 2007-05-13 17:10:41

recipher
Member
Registered: 2007-05-12
Posts: 7

Re: Capistrano Issues

I've just about got it all working now.  I'm off out but I'll post back what needs done to get it all up and running.

Offline

 

#9 2007-05-14 09:22:52

recipher
Member
Registered: 2007-05-12
Posts: 7

Re: Capistrano Issues

And now my site is dead because I've killed mongrel and kind revive it.

502 Bad Gateway

Can't start, restart or stop it.

Offline

 

#10 2008-05-08 11:55:31

feisal
Member
Registered: 2008-05-08
Posts: 2

Re: Capistrano Issues

IAIHMB wrote:

Note that Rails isn't installed on our servers it's installed with each application of type Rails in ~/webapps/(Application Name)/vendor/ so if you've replaced the original ~/webapps/(Application Name)/vendor/ with your own you will need to install Rails.

After lunch I'll see if I can't get Capistrano to cooperate. smile

Hi,.. Can you please elaborate on this ?

I keep getting the same error, i've tried "gem install v= rails"
Still the same error?

bash: /home/{user}/webapps/{app}/current/script/process/reaper: Permission Denied
What am i missing ?

Offline

 

#11 2008-05-08 15:08:17

feisal
Member
Registered: 2008-05-08
Posts: 2

Re: Capistrano Issues

Hi i've replayed this over and over again.. perhaps am too stupid to figure this out.

gem install --platform=ruby -v=2.0.2 rails
Bulk updating Gem source index for: http://gems.rubyforge.org/
Successfully installed rails-2.0.2
1 gem installed

--

* executing "/home/xxx/webapps/killerapp/current/script/process/reaper"
servers: ["webxx.webfaction.com"]
[webxx.webfaction.com] executing command
*** [err :: webxx.webfaction.com] Missing the Rails 2.0.2 gem. Please `gem install -v=2.0.2 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.
*** [err :: webxx.webfaction.com]
command finished
command "/home/xxx/webapps/killerapp/current/script/process/reaper" failed on webxx.webfaction.com

I keep getting the same error,.. please help.. anyone?

Last edited by feisal (2008-05-08 15:09:33)

Offline

 

#12 2008-09-16 18:15:58

ryankanno
Member
Registered: 2008-09-16
Posts: 2

Re: Capistrano Issues

Not sure if this will help you or not, but I wrote a quick little blog about getting Capistrano to work with WebFaction.

http://blog.localkinegrinds.com/2008/09 … ebfaction/

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson