capistrano

Any capistrano comparable for windows/.net?

See title. ...

Deploying a Git subdirectory in Capistrano

My master branch layout is like this: / <-- top level /client <-desktop client source files /server <- Rails app What I'd like to do is only pull down the /server directory in my deploy.rb, but I can't seem to find any way to do that. The /client directory is huge, so setting up a hook to copy /server to / won't work very well, it ne...

How could I get my SVN-only host to pull from a git repository?

I'd really like to get our host to pull from our Git repository instead of uploading files manually, but it doesn't have Git installed. So is there a way to trick Subversion (which they do have) into checking out a Git repository? I think I already know the answer, namely bug my host to add Git and live with it until they do, but I tho...

What should I do with the vendor directory with respect to subversion?

So I have a problem. I checked in my frozen gems and rails even though you aren't supposed to do that. I figured it was easy and wouldn't be that big of a deal anyway. Well, later I updated rails and in doing so deleted all the .svn files in the vendor/rails directories. I have heard that what I really should do is just do something ...

What is the best practice for an environment based configuration file in Ruby on Rails

I have several properties that are dependent on the environment the application is running. For example, there are links to another application that is being developed concurrantly that get displayed in the header and footer. I want those links to be different depending on what environment they are in. This is slightly different than t...

How to do a rolling restart of a cluster of mongrels

Anybody know a nice way to restart a mongrel cluster via capistrano in a "rolling" style, eg, one mongrel at a time. Would be great to have a bit of wait time in there as well for each, to let the mongrel load the rails app up as well. I've done some searching, and haven't found too much, so looking for help before I dive into the mong...

Cap invoke and sudo

I want to install a gem on all my application servers, but gem install requires sudo access - how can I enable sudo only for running this capistrano command? In other words, I don't wish to use sudo for all my deployment recipes, just when I invoke this command on the command line. ...

What's the best way to deploy a JRuby on Rails application to Tomcat?

I'm looking at ways to deploy a Ruby on Rails app (running on JRuby) to a Tomcat instance for testing. The tomcat instance is running on a Solaris server that I can SSH to. I've looked at using Capistrano, but there doesn't seem to be a lot out there about using it to deploy to Tomcat, or even about running it under JRuby, and I keep hi...

Capistrano not restarting Mongrel clusters properly

I have a cluster of three mongrels running under nginx, and I deploy the app using Capistrano 2.4.3. When I "cap deploy" when there is a running system, the behavior is: The app is deployed. The code is successfully updated. In the cap deploy output, there is this: executing "sudo -p 'sudo password: ' mongrel_rails cluster::restar...

Capistrano + thin + nginx with user not allowed to sudo howto?

I have a scenario like this which I want to use capistrano to deploy my ruby on rails application: The web application is on a thin cluster with the config file stored under /etc/thin. also an init script is in /etc/init.d/thin, so it would start automatically whenever my server needs a reboot Also nginx is executed the same way (as an...

Capistrano for Java?

I'm a big fan of Capistrano but I need to develop an automated deployment script for a Java-only shop. I've looked at Ant and Maven and they don't seem to be well geared towards remote administration the way Capistrano is - they seem much more focused on simply building and packaging applications. Is there a better tool out there? ...

Capistrano: How to Include common settings in multiple project deploy.rb files

Hello, this is probably a newbie ruby question. I have several libraries and apps that I need to deploy to several different hosts. All of the apps and libs will share some common settings for those hosts-- e.g. host name, database server/user/pass, etc. My goal is to do something like: cap host1 stage deploy cap host2 stage deploy cap...

How do I force Capistrano deployed app to use my development database?

I have a app that I'm deploying to a development server using Capistrano. I'd like to force this deployment to use the development database. So far the only way I've managed to do it is to make my production database info in database.yml equal to the development info. But this is a complete hack. I've tried setting rails_env to devel...

Keeping static files in server when deploying with Capistrano

I'm uploading files to my public/files folder of a Rails application on a constant basis through a web interface. I don't want to keep these in source control since they go for almost 2 GBs, so every time I do a cap deploy it will save those files away in releases/ and replace the directory with the pristine copy stored in the repositor...

Using capistrano when remote git is on a non-standard path

My shared host did not provide git, so I built and installed it into ~/bin. When I ran it, I got the following error on most commands, although they were successful. stdin: is not a tty I can solve that problem by adding: default_run_options[:pty] = true to my deploy.rb, but then I get this error, which blocks deployment:...

How could I 'nice' Capistrano deployment ?

How could I set a nice indice on cap:deploy ? I want the remote server nice the cp commands like that : nice -n 19 cp ... Thenk you ...

Capistrano - RAILS_GEM_VERSION Error

I can't figure this out. Capistrano keeps giving me this error: ** [out :: myserver.net] Missing the Rails 2.1.1 gem. Please `gem install -v=2.1.1 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. S...

How do I run a rake task from Capistrano?

I already have a deploy.rb that can deploy my app on my production server. My app contains a custom rake task (a .rake file in the lib/tasks directory). I'd like to create a cap task that will remotely run that rake task. ...

Using Capistrano to deploy (a non-Rails site) via FTP?

How would I go about this? I have a mostly static site, which is being hosted on a cheap web-host, which only allows FTP access to the hosting. The site is tracked in git. I am using OS X. I would like to upload a new version of the site by simply doing cap deploy ...

How do I use frozen Capistrano?

Backstory I'm on Rails 2.1 and need to freeze the Capistrano gem to my vendor folder (as my host has broken their cap gem dependencies and I want to make myself as independent as possible). On my local windows machine I've put the following my environment.rb config.gem "capistrano", :version => "2.5.2" config.gem "net-ssh", :lib => "n...