You are not logged in.
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
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. ![]()
Offline
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.)
Offline
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
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
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 ![]()
Thanks.
Offline
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
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
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
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.
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
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 16:09:33)
Offline
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