Reputation: 4211
I'm doing my first Rails deployment and using capistrano, following my host's directions:
I have the domain plantality.com.
I've created the gws folder for my app.
I've installed with capistrano and followed all the wiki instructions I could find.
public_html is pointing to gws/public but capistano has installed my app to gws/current
I've double checked that my deploy.rb paths are correct.
I've created a symlink between gws/public and public_html (I tried one between gws/current/public and public_html but it didn't help.
I'm trying to use Passenger if it makes any difference.
Here is my deploy.rb:
set :user, 'plantali'
set :scm_username, 'solent'
set :scm_password, '<removed>'
set :svnserver, 'plantality.sourcerepo.com'
set :application, "gws"
set :repository, "http://#{svnserver}/plantality/gws/gws"
set :server, 'plantality.com'
set :applicationdir, 'gws'
set :use_sudo, false
set :keep_releases, 5
set :scm, :subversion
role :web, "plantality.com" # Your HTTP server, Apache/etc
role :app, "plantality.com" # This may be the same as your `Web` server
role :db, "plantality.com", :primary => true # This is where Rails migrations will run
#role :db, ""
set :deploy_to, "/home/#{user}/#{applicationdir}"
set :group_writeable, false
Upvotes: 1
Views: 574
Reputation: 115292
Capistrano deploys releases into timestamped directories under the releases
directory and creates a symbolic link named current
that points to the root of the Rails application within the latest release directory.†
Therefore the Rails root of your application is /home/<user>/gws/current/
and Passenger needs to be configured to serve the application from there accordingly. Set the Apache DocumentRoot
in the virtual host that Passenger is using to /home/<user>/gws/current/public
and restart Passenger.
† Incidentally, this is how Capistrano can easily roll back a bad release—it simply recreates the symlink to point to the previous timestamped release.
Upvotes: 2