title: How to deploy Rails 2.3.2 app with Capistrano from the top (for FastCGI)?
body: <p>Disclaimer: i am a noob to Rails and Capistrano (but an intermediate .NET C# developer) trying to learn more.</p>
  
  <p>i have been have the toughest time getting a Capistrano development process set-up.  here's what i have so far for my deploy.rb:</p>
  
  <pre><code>
  set :application, "MyAppName"
  set :domain, "domainname"
  set :user, "userid" 
  set :repository,  "svn+ssh://#{user}@#{domain}/home/#{user}/svn/#{application}/trunk"
  set :rails_env, :production
  set :chmod755, %w(app config db lib public vendor script tmp public/dispatch.cgi public/dispatch.fcgi public/dispatch.rb)
  set :deploy_to, "/home/#{user}/apps/#{application}"
  set :use_sudo, false
  set :deploy_via, :checkout
  set :group_writable, false
  default_run_options[:pty] = true
  role :app, domain
  role :web, domain
  role :db,  domain, :primary => true
  </code></pre>
  
  <p>here's my Capfile:</p>
  
  <pre><code>
  load 'deploy' if respond_to?(:namespace) # cap2 differentiator
  Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
  load 'config/deploy'
  
  namespace :deploy do
  
    task :restart, :roles => :app do
      run "#{current_path}/script/process/reaper --dispatcher=dispatch.fcgi"
    end
  
    desc "Set the proper permissions for directories and files on HostingRails accounts"
    task :after_deploy do
      run(chmod755.collect do |item|
        "chmod 755 #{current_path}/#{item}"
      end.join(" && "))
    end
  
  end
  </code></pre>
  
  <ol>
  <li>Rails 2.3.2 doesn't have the script/process directory so the restart task doesn't work at all. How do I fix this?</li>
  <li>Is there a way to set the RAILS_ENV variable in environment.rb to "production" when the application is deployed ("set :rails_env, :production" does not do it)?</li>
  <li>Also, am I missing anything else from these 2 files?</li>
  </ol>