This is probably really basic, but I'm stuck and I haven't found any 
help online.

What would cause my app, instead of showing the home page, to merely 
list the contents of the /public directory?

Index of /
    * <http://www.hitagroup.org/404.html>404.html
    * <http://www.hitagroup.org/422.html>422.html
    * <http://www.hitagroup.org/500.html>500.html
    * <http://www.hitagroup.org/dispatch.cgi>dispatch.cgi
    * <http://www.hitagroup.org/dispatch.fcgi>dispatch.fcgi
    * <http://www.hitagroup.org/dispatch.rb>dispatch.rb
    * <http://www.hitagroup.org/favicon.ico>favicon.ico
    * <http://www.hitagroup.org/files/>files/
    * <http://www.hitagroup.org/htaccess_original>htaccess_original
    * <http://www.hitagroup.org/images/>images/
    * <http://www.hitagroup.org/javascripts/>javascripts/
    * <http://www.hitagroup.org/robots.txt>robots.txt
    * <http://www.hitagroup.org/stylesheets/>stylesheets/
    * <http://www.hitagroup.org/system/>system/
My first thought is that Rails is not running, but the shared host, 
under mod_rails, usually throws up a page when there's a problem.

This has occurred as the result of some change to the code or 
deploy.rb, but deploy.rb is almost unchanged from the original that 
worked and all the files and symbolic links seem to be in their 
proper places. And 'cap deploy:rollback' successfully rolls back to 
displaying the home page, running the previous release.

Thanks,

Scott



This new app uses shared hosting at a host where I have another app 
also, the other app's deploy.rb file is almost identical and it works.

The first deployment worked correctly and the app is running. I 
symbolically linked a couple directories containing public files by 
hand, now I've put that in the Capistrano file (in the :after_symlink 
task) and I've broken it, even when I take it back out.

Deployment executes correctly, no error messages. The code has been 
loaded, all the symbolic links, including ~/www on up, look just as 
they did before, except for /current pointing to the new release.

I have made some minor code changes. The code runs fine on my 
development machine.

But instead of displaying the home page in production, the browser 
shows the contents of the 'public' directory (if rolled back, it 
works correctly again):

Index of /
    * <http://www.hitagroup.org/404.html>404.html
    * <http://www.hitagroup.org/422.html>422.html
    * <http://www.hitagroup.org/500.html>500.html
    * <http://www.hitagroup.org/dispatch.cgi>dispatch.cgi
    * <http://www.hitagroup.org/dispatch.fcgi>dispatch.fcgi
    * <http://www.hitagroup.org/dispatch.rb>dispatch.rb
    * <http://www.hitagroup.org/favicon.ico>favicon.ico
    * <http://www.hitagroup.org/files/>files/
    * <http://www.hitagroup.org/htaccess_original>htaccess_original
    * <http://www.hitagroup.org/images/>images/
    * <http://www.hitagroup.org/javascripts/>javascripts/
    * <http://www.hitagroup.org/robots.txt>robots.txt
    * <http://www.hitagroup.org/stylesheets/>stylesheets/
    * <http://www.hitagroup.org/system/>system/
What might be causing this?

Thanks,

Scott


deploy.rb:

set :application, "appname"

# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
set :deploy_to, "/home/username/rails_apps/appname"

default_run_options[:pty] = true

# If you aren't using Subversion to manage your source code, specify
# your SCM below:
set :scm, :git
set :repository, "git://git.assembla.com/appname.git"
set :branch, "master"
set :deploy_via, :remote_cache

set :user, 'username'
set :use_sudo, false
set :ssh_options, { :forward_agent => true }

role :app, "access.servername.com"
role :web, "access.servername.com"
role :db,  "access.servername.com", :primary => true

namespace :deploy do

   desc "hook up paths to public files"
   task :after_symlink, :roles => :app do
     run "ln -s #{shared_path}/member_files  #{current_path}/member_files"
     run "ln -s #{shared_path}/files         #{current_path}/public/files"
   end

   desc "Restarting mod_rails with restart.txt"
   task :restart, :roles => :app, :except => { :no_release => true } do
     run "touch #{current_path}/tmp/restart.txt"
   end

   [:start, :stop].each do |t|
     desc "#{t} task is a no-op with mod_rails"
     task t, :roles => :app do ; end
   end

end


--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to