Ruby on rails 未定义的局部变量或方法';位置配置文件名';-将乘客从4升级到5时
为什么在尝试从Ruby on rails 未定义的局部变量或方法';位置配置文件名';-将乘客从4升级到5时,ruby-on-rails,passenger,upgrade,Ruby On Rails,Passenger,Upgrade,为什么在尝试从4升级到5时出现以下错误 `block in write_nginx_config_file': undefined local variable or method `location_config_filename' for #<PhusionPassenger::Standalone::StartCommand:0x007fd2dbb64030> (NameError) `write_nginx_config_文件中的block':未定义的局部变量或#的方法`l
4
升级到5
时出现以下错误
`block in write_nginx_config_file': undefined local variable or method `location_config_filename' for #<PhusionPassenger::Standalone::StartCommand:0x007fd2dbb64030> (NameError)
`write_nginx_config_文件中的block':未定义的局部变量或#的方法`location_config_filename'(NameError)
更新配置文件,因为它发生了显著变化:
-bash> diff $(passenger-config about resourcesdir)/templates/standalone/config.erb config/nginx.conf.erb.original
24c24
< error_log '<%= @options[:log_file] %>' <% if @options[:log_level] >= LVL_DEBUG %>info<% end %>;
---
> error_log '<%= @options[:log_file] %>' <% if debugging? %>info<% end %>;
45c45
< passenger_root '<%= PhusionPassenger.install_spec %>';
---
> passenger_root '<%= location_config_filename %>';
47c47
< passenger_ctl cleanup_pidfiles <%= serialize_strset("#{@working_dir}/temp_dir_toucher.pid") %>;
---
> passenger_ctl cleanup_pidfiles <%= serialize_strset("#{@temp_dir}/temp_dir_toucher.pid") %>;
49,51c49,50
< <%= nginx_option :passenger_log_level, :log_level %>
< <%= nginx_option :passenger_max_pool_size, :max_pool_size %>
< <%= nginx_option :passenger_min_instances, :min_instances %>
---
> passenger_max_pool_size <%= @options[:max_pool_size] %>;
> passenger_min_instances <%= @options[:min_instances] %>;
61,62c60,61
< <% if @options[:instance_registry_dir] %>passenger_instance_registry_dir '<%= @options[:instance_registry_dir] %>';<% end %>
< <% if @options[:data_buffer_dir] %>passenger_data_buffer_dir '<%= @options[:data_buffer_dir] %>';<% end %>
---
> <% if debugging? %>passenger_log_level 2;<% end %>
> <% if @options[:temp_dir] %>passenger_temp_dir '<%= @options[:temp_dir] %>';<% end %>
76,80c75
<
< <% @options[:ctls].each do |ctl| %>
< passenger_ctl '<%= ctl.split("=", 2)[0] %>' '<%= ctl.split("=", 2)[1] %>';
< <% end %>
<
---
>
96,107c91,96
<
< <% if @app_finder.multi_mode? %>
< # Default server entry for mass deployment mode.
< server {
< <% if @options[:ssl] %>
< <% if @options[:ssl_port] %>
< listen <%= nginx_listen_address %>;
< listen <%= nginx_listen_address_with_ssl_port %> ssl;
< <% else %>
< listen <%= nginx_listen_address %> ssl;
< <% end %>
< <% else %>
---
>
> <% if @apps.size > 1 %>
> # Default server entry.
> server {
> <% if @options[:ssl] %>
> <% if @options[:ssl_port] %>
108a98,100
> listen <%= nginx_listen_address_with_ssl_port %> ssl;
> <% else %>
> listen <%= nginx_listen_address %> ssl;
110,111c102,106
< root '<%= PhusionPassenger.resources_dir %>/standalone_default_root';
< }
---
> <% else %>
> listen <%= nginx_listen_address %>;
> <% end %>
> root '<%= PhusionPassenger.resources_dir %>/standalone_default_root';
> }
113a109,115
> <% if @options[:ping_port] %>
> server {
> listen <%= nginx_listen_address(@options, true) %>;
> root '<%= PhusionPassenger.resources_dir %>/standalone_default_root';
> }
> <% end %>
>
138,139c140,141
< <% if app[:concurrency_model] && app[:concurrency_model] != DEFAULT_CONCURRENCY_MODEL %>passenger_concurrency_model <%= app[:concurrency_model] %>;<% end %>
< <% if app[:thread_count] && app[:thread_count] != DEFAULT_APP_THREAD_COUNT %>passenger_thread_count <%= app[:thread_count] %>;<% end %>
---
> <% if app[:concurrency_model] != DEFAULT_CONCURRENCY_MODEL %>passenger_concurrency_model <%= app[:concurrency_model] %>;<% end %>
> <% if app[:thread_count] != DEFAULT_THREAD_COUNT %>passenger_thread_count <%= app[:thread_count] %>;<% end %>
142,144c144,145
< <% if app[:sticky_sessions] %>passenger_sticky_sessions on;<% end %>
< <% if app[:sticky_sessions_cookie_name] %>passenger_sticky_sessions_cookie_name '<%= app[:sticky_sessions_cookie_name] %>';<% end %>
< <% if app[:vary_turbocache_by_cookie] %>passenger_vary_turbocache_by_cookie '<%= app[:vary_turbocache_by_cookie] %>';<% end %>
---
> <% if @options[:sticky_sessions] %>passenger_sticky_sessions on;<% end %>
> <% if @options[:sticky_sessions_cookie_name] %>passenger_sticky_sessions_cookie_name '<%= sticky_sessions_cookie_name %>';<% end %>
154,157d154
< <% app[:envvars].each_pair do |name, value| %>
< passenger_env_var '<%= name %>' '<%= value %>';
< <% end %>
<
-bash>diff$(乘客配置关于资源dir)/templates/standalone/config.erb-config/nginx.conf.erb.original
24c24
信息;
---
>错误\u日志“”信息;
45c45
乘客"根";;
47c47
<乘客控制清理文件;
---
>乘客控制清理文件;
49,51c49,50
<
<
<
---
>乘客\最大\游泳池\大小;
>乘客(分钟)情况;;
61,62c60,61
乘客日志2级;
>乘客临时主管;
76,80c75
<
<
96107C91,96
<
<
<#大规模部署模式的默认服务器条目。
<服务器{
<
<
<倾听;
> 1 %>
>#默认服务器条目。
>服务器{
>
>
108A98100
>听ssl;
>
>听ssl;
110111C102106
>倾听;
>
>根“/standalone_default_root”;
> }
113A109115
>
>服务器{
>倾听;
>根“/standalone_default_root”;
> }
>
>
138139C140141
乘客并发模型;
>乘客人数;
142144C144145
乘客会议;
>乘客_粘性_会话_cookie_名称“”;
154157D154
<
…包括问题中引用的行:
< passenger_root '<%= PhusionPassenger.install_spec %>';
---
> passenger_root '<%= location_config_filename %>';
乘客"根";;