我对导致此错误的原因感到困惑?我可以在我的本地计算机上运行应用程序,并且所有内容都可以编译而没有问题,但是在Windows Server 2012上它会导致问题。
有什么建议吗?
[2013-03-05 10:27:18] INFO WEBrick::HTTPServer#start: pid=2008 port=3000
Connecting to database specified by database.yml
Started GET "/" for 127.0.0.1 at 2013-03-05 10:27:28 +0000
Processing by StaticController#home as HTML
Rendered static/home.html.erb within layouts/application (108.0ms)
Compiled cloud.css (1ms) (pid 2008)
Compiled contact.css (0ms) (pid 2008)
Compiled footer.css (0ms) (pid 2008)
Compiled global.css (1ms) (pid 2008)
Compiled header.css (0ms) (pid 2008)
Compiled nav.css (1ms) (pid 2008)
Compiled news.css (0ms) (pid 2008)
Compiled ourteam.css (0ms) (pid 2008)
Compiled services.css (0ms) (pid 2008)
Compiled slider/nivo-slider.css (0ms) (pid 2008)
Compiled slider/themes/bar/bar.css (0ms) (pid 2008)
Compiled slider/themes/dark/dark.css (1ms) (pid 2008)
Compiled slider/themes/default/default.css (0ms) (pid 2008)
Compiled slider/themes/light/light.css (0ms) (pid 2008)
Compiled application.css (287ms) (pid 2008)
Compiled jquery.js (6ms) (pid 2008)
Compiled jquery_ujs.js (1ms) (pid 2008)
Compiled jquery.flip.min.js (0ms) (pid 2008)
Compiled jquery-1.8.3.js (6ms) (pid 2008)
Compiled jquery.flip.js (1ms) (pid 2008)
Compiled slider/jquery-1.9.0.min.js (3ms) (pid 2008)
Compiled slider/jquery.nivo.slider.js (2ms) (pid 2008)
Compiled application.js (431ms) (pid 2008)
Completed 500 Internal Server Error in 144851ms
ActionView::Template::Error (
(in C:/inetpub/wwwroot/app/assets/javascripts/application.js)):
4: <title>Class Technology Solutions <%= content_for?(:title) ? '- ' + y
ield(:title) : "" %></title>
5: <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6: <%= stylesheet_link_tag "application" %>
7: <%= javascript_include_tag "application" %>
8: <%= csrf_meta_tag %>
9: </head>
10: <body>
app/views/layouts/application.html.erb:7:in `_app_views_layouts_application_ht
ml_erb___324488381_53941380'
app/controllers/static_controller.rb:12:in `home'
的application.js:
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
//= require jquery.flip.min
//= require_tree .
答案 0 :(得分:0)
删除此行 // = require_tree。
在 app / assets / javascripts / application.js
中同样的问题:
Rails 3.1 issue with javascript_include_tag in application.html.erb