0

我通过复制 config/environment/production.rb 下的文件内容并在数据库和其他 ymls 中添加了 env 键,在 rails 2.3(Fedena) 创建了一个自定义环境。在此自定义环境中成功创建和迁移数据库。但是,在自定义环境中启动服务器后,我无法访问站点。启动服务器不会引发任何错误,但在访问站点时我收到错误

NoMethodError (undefined method `+' for nil:NilClass)

我在其他环境中没有收到此错误。错误的堆栈跟踪如下:

/usr/local/rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.5/lib/action_controller/request.rb:332:in `subdomains'
/home/soarlogic/Documents/rails/fedena/vendor/plugins/subdomain-fu/lib/subdomain-fu.rb:132:in `current_subdomain'
/home/soarlogic/Documents/rails/fedena/vendor/plugins/subdomain-fu/lib/subdomain_fu/routing_extensions.rb:27:in `extract_request_environment'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:441:in `recognize'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:436:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:87:in `dispatch'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:121:in `_call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.5/lib/action_controller/string_coercion.rb:25:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.5/lib/action_controller/string_coercion.rb:25:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rack-1.0.1/lib/rack/head.rb:9:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.5/lib/action_controller/params_parser.rb:15:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/rails/rack/metal.rb:47:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.5/lib/action_controller/session/abstract_store.rb:122:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:29:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:9:in `cache'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:28:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.5/lib/action_controller/failsafe.rb:26:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rack-1.0.1/lib/rack/lock.rb:11:in `synchronize'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:106:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/rails/rack/static.rb:31:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/rails/rack/log_tailer.rb:17:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/rails/rack/static.rb:31:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/rails/rack/log_tailer.rb:17:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in `service'
/usr/local/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/local/rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rack-1.0.1/lib/rack/handler/webrick.rb:14:in `run'
/usr/local/rvm/gems/ruby-1.8.7-head/gems/rails-2.3.5/lib/commands/server.rb:111
/usr/local/rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
script/server:3
4

0 回答 0