2016-09-30 23 views
0

В драгоценном камне capistrano/maintenance у меня возникли проблемы с установкой пути для переменной :maintenance_template_path.Конфигурация maintenance_template_path для драгоценного камня capistrano-maintenace

Я попытался

# 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' 

Я получаю No such file or directory @ rb_sysopen ошибку.

Файл находится в правильном месте /Users/David/Documents/Development/myRailsApp/app/views/errors/maintenance.erb.html

Что такое правильная конфигурация?

ответ

1

Для этого необходим абсолютный путь. Предполагая, что вы используете config/deploy.rb, вы можете сделать это:

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