2013-03-05 36 views
0

我很困惑什麼導致這個錯誤?我能夠在本地機器上運行生產環境中的應用程序,並且所有內容都可以毫無問題地編譯,但是在windows server 2012上,這會造成問題。ActionView :: Template ::生產中的錯誤

有什麼建議嗎?

[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

你可以張貼的'application.js'請的內容。另外,爲什麼要包含jQuery Flip的開發和縮小版本? – 2013-03-05 09:05:42

+0

補充,也感謝您注意到這一點,我對jQuery/Javascript等方面無能爲力。我現在只使用縮小版本。 – 2013-03-05 09:30:07

+0

爲什麼要包含jquery.flip兩次? – itsnikolay 2013-03-05 09:41:47

回答

0

刪除這條線// = require_tree。

應用程序/資產/ JavaScript的

/application.js中

同一個問題:

Rails 3.1 issue with javascript_include_tag in application.html.erb

+0

謝謝,但不幸的是這對我不起作用,我仍然得到同樣的錯誤。 但是,註釋掉<%= javascript_include_tag「應用程序」%>適用於我。 – 2013-03-27 14:49:42

相關問題