【发布时间】:2019-02-12 23:19:01
【问题描述】:
我在 heroku 的部署遇到了问题! 我刚刚使用 cedar 堆栈创建了一个应用测试,推送我的应用,我遇到了这个问题(日志)
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m ActionView::Template::Error (Unexpected token: operator (<)
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m (in /app/app/assets/javascripts/application.js)):
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m 3: <head>
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m 4: <title>Test</title>
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m 5: <%= stylesheet_link_tag "application" %>
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m 6: <%= javascript_include_tag "application" %>
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m 7: <%= csrf_meta_tags %>
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m 8: </head>
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m 9: <body>
有什么想法吗??
更新:
我的 application.js 文件
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require_tree .
【问题讨论】:
-
application.js中可能发生了一些奇怪的事情。您是否检查过它在 localhost 中是否正常工作? -
是的,在我的本地服务器应用程序工作正常。
-
它是否在您的本地机器上正常工作在生产模式(预编译资产)? /app/assets/javascript 目录下有非 js/coffee 文件吗?
-
不,只有 application.js 和 rails 生成的所有 .js.coffee 文件
-
你有没有解决这个问题?我遇到了同样的错误...
标签: ruby-on-rails heroku