0

我很困惑是什么导致了这个错误?我能够在我的本地机器上运行生产中的应用程序,并且一切编译都没有问题,但是在 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'

应用程序.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 .
4

1 回答 1

0

删除这一行//= require_tree 。

app/assets/javascripts/application.js

同样的问题:

Rails 3.1 与 application.html.erb 中的 javascript_include_tag 问题

于 2013-03-22T00:03:24.747 回答