2016-09-30 5 views
0

capistrano/maintenance 보석에서 :maintenance_template_path 변수 경로를 설정하는 데 문제가 있습니다.'capistrano-maintenace'gem에 대한 maintenance_template_path 구성

나는 내가 No such file or directory @ rb_sysopen 오류가 계속

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

을 시도했습니다.

파일이 올바른 자리 /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__)