2016-09-30 5 views
0

In der capistrano/maintenance Gem, habe ich Probleme beim Festlegen des Pfades für die Variable :maintenance_template_path.Konfigurieren Sie Maintenance_Template_Path für 'Capistrano-Maintenace' Gem

Ich habe

versucht
# Set the maintenance file path 
set :maintenance_template_path, '/views/errors/maintenance' 
set :maintenance_template_path, '/errors/maintenance' 
set :maintenance_template_path, '/app/views/errors/maintenance' 
set :maintenance_template_path, '/errors/maintenance.erb.html' 
set :maintenance_template_path, '/views/errors/maintenance.erb.html' 
set :maintenance_template_path, 'app/views/errors/maintenance.erb.html' 

Ich erhalte No such file or directory @ rb_sysopen Fehler.

Die Datei ist in der richtigen Stelle /Users/David/Documents/Development/myRailsApp/app/views/errors/maintenance.erb.html

Was ist die korrekte Konfiguration?

Antwort

1

Es erfordert einen absoluten Pfad. Angenommen, Sie verwenden config/deploy.rb, dann können Sie dies tun:

set :maintenance_template_path, 
    File.expand_path("../../app/views/errors/maintenance.erb.html", __FILE__) 
Verwandte Themen