ActionView :: Helpers :: ControllerHelper #params委托给controller.params,但是控制器是零

时间:2018-04-25 18:38:17

标签: ruby-on-rails ruby

对此问题感到沮丧。每当我刷新页面时,我都会在控制台上打印下面的行

ActionView::Template::Error: ActionView::Helpers::ControllerHelper#params delegated to controller.params, but controller is nil: #<WebConsole::View:0x007fbf0137b398 @_config={}, @view_renderer=#<ActionView::Renderer:0x007fbf0137af88 @lookup_context=#<ActionView::LookupContext:0x007fbf0137b348 @details_key=nil, @cache=true, @prefixes=[], @rendered_format=:html, @details={:locale=>[:en], :formats=>[:html, :js, :text, :css, :ics, :csv, :vcf, :png, :jpeg, :gif, :bmp, :tiff, :svg, :mpeg, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip, :gzip, :xlsx], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :axlsx, :coffee, :jbuilder, :haml]}, @view_paths=#<ActionView::PathSet:0x007fbf0137b230 @paths=[#<ActionView::OptimizedFileSystemResolver:0x007fbf0137b1e0 @pattern=":prefix/:action{.:locale,}{.:formats,}{+:variants,}{.:handlers,}", @cache=#<ActionView::Resolver::Cache:0x7fbf0137b1b8 keys=4 queries=0>, @path="/home/hemant/.rvm/gems/ruby-2.3.1/gems/web-console-3.5.1/lib/web_console/templates">]>>>, @env={"rack.version"=>[1, 3], "rack.errors"=>#<IO:<STDERR>>, "rack.multithread"=>true, "rack.multiprocess"=>false, "rack.run_once"=>false, "SCRIPT_NAME"=>"", "QUERY_STRING"=>"", "SERVER_PROTOCOL"=>"HTTP/1.1", "SERVER_SOFTWARE"=>"puma 3.11.3 Love Song", "GATEWAY_INTERFACE"=>"CGI/1.2", "REQUEST_METHOD"=>"GET", "REQUEST_PATH"=>"/assets/pxiByp8kv8JHgFVrLDz8Z1xlFQ.woff2", "REQUEST_URI"=>"/assets/pxiByp8kv8JHgFVrLDz8Z1xlFQ.woff2", "HTTP_VERSION"=>"HTTP/1.1", "HTTP_HOST"=>"localhost:3000", "HTTP_CONNECTION"=>"keep-alive", "HTTP_ORIGIN"=>"http://localhost:3000", "HTTP_USER_AGENT"=>"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36", "HTTP_ACCEPT"=>"*/*", "HTTP_REFERER"=>"http://localhost:3000/assets/google300.css", "HTTP_ACCEPT_ENCODING"=>"gzip, deflate, br", "HTTP_ACCEPT_LANGUAGE"=>"en-GB,en-US;q=0.9,en;q=0.8", "HTTP_COOKIE"=>"_premier_ats_session=YllLSEZLb3VWOUc0MTExRUlEMUhVcmxEOGtlUDdEeU1ueHFzVHpJNlRnTDI5dnY1dkNQYlFyVG92QzY4M0tpSjZ1bWF4cEVXKzBlUHNkZjhVODFOczhSQUNRUjVnU0UvSVM4RkxOSWdlNEN1bENNOWQvaVYyWDdtZFJnUlhmTzJzLzA4ZTZsaXpjUk5sOFR4bXdLck85V0RWQW1md0tZc2FwOWhMbXc4V3N5dDZ5a3Q5S1VuMjZwVVBnaU54OW9xbnpEamc2d0xpSklMTStEUDUwK1RGbm5QTUxNaTRqQXdUUU9FdWdON2g4ZlJ6UXB5WjFYZC9jcklrdVhrRmlxa1dSbHBPYkJpRGgvcjVINDZhaEJlYlE9PS0tdmR4UWh4dEI2T0JHeHJKalVjdjZ5UT09--cfb90a4802dac6a20f923d1d5202481f5daee857; _sofu_session=c29e17476d0eb841a1cf27e353e8bd2e", "SERVER_NAME"=>"localhost", "SERVER_PORT"=>"3000", "PATH_INFO"=>"/assets/pxiByp8kv8JHgFVrLDz8Z1xlFQ.woff2", "REMOTE_ADDR"=>"127.0.0.1", "puma.socket"=>#<TCPSocket:fd 18>, "rack.hijack?"=>true, "rack.hijack"=>#<Puma::Client:0x2b83b64 @ready=true>, "rack.input"=>#<Puma::NullIO:0x0000000623acc0>, "rack.url_scheme"=>"http", "rack.after_reply"=>[], "puma.config"=>#<Puma::Configuration:0x0000000635ace0 @options=#<Puma::UserFileDefaultOptions:0x0000000635aa38 @user_options={:log_requests=>false, :app=>#<Sofu::Application:0x000000053c0e10 @_all_autoload_paths=["/home/hemant/hemant/sofu/lib", "/home/hemant/hemant/sofu/app/assets", "/home/hemant/hemant/sofu/app/channels", "/home/hemant/hemant/sofu/app/controllers", "/home/hemant/hemant/sofu/app/controllers/concerns", "/home/hemant/hemant/sofu/app/datatables", "/home/hemant/hemant/sofu/app/helpers", "/home/hemant/hemant/sofu/app/jobs", "/home/hemant/hemant/sofu/app/mailers", "/home/hemant/hemant/sofu/app/models", "/home/hemant/hemant/sofu/app/models/concerns"], @_all_load_paths=["/home/hemant/hemant/sofu/lib", "/home/hemant/hemant/sofu/vendor", "/home/hemant/hemant/sofu/app/assets", "/home/hemant/hemant/sofu/app/channels", "/home/hemant/hemant/sofu/app/controllers", "/home/hemant/hemant/sofu/app/controllers/concerns", "/home/hemant/hemant/sofu/app/datatables", "/home/hemant/hemant/sofu/app/helpers", "/home/hemant/hemant/sofu/app/jobs", "/home/hemant/hemant/sofu/app/mailers", "/home/hemant/hemant/sofu/app/models", "/home/hemant/hemant/sofu/app/models/concerns"], @app=#<Rack::Sendfile:0x000000060269e8 @app=#<ActionDispatch::Static:0x00000006026d58 @app=#<ActionDispatch::Executor:0x00000006026da8 @app=#<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x000000050ba450 @name="ActiveSupport::Cache::Strategy::LocalCache", @local_cache_key=:active_support_cache_null_store_local_cache_42362840, @app=#<Rack::Runtime:0x00000006026dd0 @app=#<Rack::MethodOverride:0x00000006026df8 @app=#<ActionDispatch::RequestId:0x00000006026e20 @app=#<RequestStore::Middleware:0x00000006026e48 @app=#<Sprockets::Rails::QuietAssets:0x000000060270f0 @app=#<Rails::Rack::Logger:0x00000006027140 @app=#<ActionDispatch::ShowExceptions:0x00000006027168 @app=#<WebConsole::Middleware:0x00000006027190 @app=#<ActionDispatch::DebugExceptions:0x000000060271b8 @app=#<ActionDispatch::RemoteIp:0x000000060271e0 @app=#<ActionDispatch::Reloader:0x00000006027230 @app=#<ActionDispatch::Callbacks:0x00000006027258 @app=#<ActiveRecord::Migration::CheckPending:0x00000006027280 @app=#<ActionDispatch::Cookies:0x000000060272a8 @app=#<ActionDispatch::Session::ActiveRecordStore:0x00000006027370 @app=#<Rack::Head:0x00000006027398 @app=#<Rack::ConditionalGet:0x000000060273c0 @app=#<Rack::ETag:0x000000060273e8 @app=#<Warden::Manager:0x000000060274b0 @config={:default_scope=>:user, :scope_defaults=>{}, :default_strategies=>{:user=>[:rememberable, :database_authenticatable]}, :intercept_401=>false, :failure_app=>#<Devise::Delegator:0x0000000420a658>}, @app=#<Remotipart::Middleware:0x000000060274d8 @app=#<Rack::Pjax:0x00000006027528 @app=#<ActionDispatch::Routing::RouteSet:0x000000051bde60>>>>, @cache_control="max-age=0, private, must-revalidate", @no_cache_control="no-cache">>>, @default_options={:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :defer=>false, :renew=>false}, @key="_sofu_session", @cookie_only=true>>, @last_check=1524678822>>, @executor=#<Class:0x0000000535e558>>, @check_ip=true, @proxies=[#<IPAddr: IPv4:127.0.0.1/255.255.255.255>, #<IPAddr: IPv6:0000:0000:0000:0000:0000:0000:0000:0001/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff>, #<IPAddr: IPv6:fc00:0000:0000:0000:0000:0000:0000:0000/fe00:0000:0000:0000:0000:0000:0000:0000>, #<IPAddr: IPv4:10.0.0.0/255.0.0.0>, #<IPAddr: IPv4:172.16.0.0/255.240.0.0>, #<IPAddr: IPv4:192.168.0.0/255.255.0.0>]>, @routes_app=#<Sofu::Application:0x000000053c0e10 ...>, @response_format=:default>>, @exceptions_app=#<ActionDispatch::PublicExceptions:0x00000006074b48 @public_path=#<Pathname:/home/hemant/hemant/sofu/public>>>, @taggers=[]>, @assets_regex=/\A\/{0,2}\/assets/>>>>, @header_name="X-Runtime">>, @executor=#<Class:0x0000000536bc30>>, @file_handler=#<ActionDispatch::FileHandler:0x00000006026ce0 @root="/home/hemant/hemant/sofu/public", @file_server=#<Rack::File:0x00000006026ba0 @root="/home/hemant/hemant/sofu/public", @headers={}, @default_mime="text/plain", @head=#<Rack::Head:0x00000006026a10 @app=#<Proc:0x00000006026a88@/home/hemant/.rvm/gems/ruby-2.3.1/gems/rack-2.0.4/lib/rack/file.rb:26 (lambda)>>>, @index="index">>, @variation=nil, @mappings=[]>, @config=#<Rails::Application::Configuration:0x0000000535df18 @root=#<Pathname:/home/hemant/hemant/sofu>, @generators=#<Rails::Configuration::Generators:0x000000029fe578 @aliases={}, @options={:rails=>{:orm=>:active_record, :test_framework=>:test_unit, :integration_tool=>:test_unit, :stylesheet_engine=>:scss, :javascript_engine=>:coffee}, :active_record=>{:migration=>true, :timestamps=>true}, :test_unit=>{:fixture=>true, :fixture_replacement=>nil}}, @fallbacks={}, @templates=[], @colorize_logging=true, @api_only=false, @hidden_namespaces=["sass"]>, @middleware=#<ActionDispatch::MiddlewareStack:0x000000063492b0 @middlewares=[Rack::Sendfile, ActionDispatch::Static, ActionDispatch::Executor, ActiveSupport::Cache::Strategy::LocalCache::Middleware, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, RequestStore::Middleware, Sprockets::Rails::QuietAssets, Rails::Rack::Logger, ActionDispatch::ShowExceptions, WebConsole::Middleware, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::Migration::CheckPending, ActionDispatch::Cookies, ActionDispatch::Session::ActiveRecordStore, ActionDispatch::Flash, Rack::Head, Rack::ConditionalGet, Rack::ETag, Warden::Manager, Remotipart::Middleware, ActionDispatch::Flash, Rack::Pjax]>, @encoding="utf-8", @allow_concurrency=nil, @consider_all_requests_local=true, @filter_parameters=[:password], @filter_redirect=[], @helpers_paths=["/home/hemant/hemant/sofu/app/helpers", "/home/hemant/.rvm/gems/ruby-2.3.1/gems/font-awesome-rails-4.7.0.3/app/helpers", "/home/hemant/.rvm/gems/ruby-2.3.1/gems/devise-4.4.3/app/helpers"], @public_file_server={:enabled=>true, :index_name=>"index"}, @force_ssl=false, @ssl_options={:hsts=>{:subdomains=>true}}, @session_store=:active_record_store, @session_options={:key=>"_sofu_session"}, @time_zone="UTC", @be

我查看了此链接:*** RuntimeError Exception: ActionView::Helpers::ControllerHelper#response delegated to controller.response, but controller is nil

但没有任何帮助我

0 个答案:

没有答案
相关问题