我在使用IE11(echh)和Rails 4以及JS响应时遇到问题
它不起作用..
def sign_in
# some code
respond_to do |format|
format.js {render partial: 'shared/login_needed'}
end
end
这是视图
<%= link_to "GET STARTED", sign_in_path, remote: true, class: "btn btn-primary btn-lg get_started" %>
点击链接时会发生这种情况:
Mar 29 07:12:07 myapp app/web.1: ActionController::RoutingError (No route matches [GET] "/browserconfig.xml"):
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/actionpack-4.0.4/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/actionpack-4.0.4/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/rack/logger.rb:38:in `call_app'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/rack/logger.rb:20:in `block in call'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/tagged_logging.rb:68:in `block in tagged'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/tagged_logging.rb:26:in `tagged'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/tagged_logging.rb:68:in `tagged'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/rack/logger.rb:20:in `call'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/actionpack-4.0.4/lib/action_dispatch/middleware/request_id.rb:21:in `call'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.4/lib/active_support/cache/strategy/local_cache.rb:83:in `call'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/actionpack-4.0.4/lib/action_dispatch/middleware/static.rb:64:in `call'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/engine.rb:511:in `call'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/application.rb:97:in `call'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/connection.rb:86:in `block in pre_process'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/connection.rb:84:in `catch'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/connection.rb:84:in `pre_process'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/connection.rb:53:in `process'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/connection.rb:39:in `receive_data'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/handler/thin.rb:16:in `run'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:264:in `start'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/commands/server.rb:84:in `start'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/commands.rb:76:in `block in <top (required)>'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/commands.rb:71:in `tap'
Mar 29 07:12:07 myapp app/web.1: vendor/bundle/ruby/2.1.0/gems/railties-4.0.4/lib/rails/commands.rb:71:in `<top (required)>'
Mar 29 07:12:07 myapp app/web.1: bin/rails:4:in `require'
Mar 29 07:12:07 myapp app/web.1: bin/rails:4:in `<main>'
更新
我已添加
<meta name="msapplication-config" content="none"/>
并且上面的路由错误消失了。但是IE11在点击链接
时仍然没有做任何事情没有js错误,这些是响应的标题
Cache-Control:no-cache, no-store, max-age=0, must-revalidate
Connection:keep-alive
Content-Type:text/javascript; charset=utf-8
Expires:-1
Pragma:no-cache
Server:thin 1.6.2 codename Doc Brown
transfer-encoding:chunked
Vary:Accept
X-Content-Type-Options:nosniff
X-Frame-Options:SAMEORIGIN
X-Request-Id:a4cdc500-d720-4156-b61c-7a5ae427d430
X-Runtime:0.007740
X-Ua-Compatible:chrome=1
X-Xss-Protection:1; mode=block
有什么想法吗?