加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 部署到Heroku的意外字符’#’

发布时间:2020-12-17 01:49:46 所属栏目:百科 来源:网络整理
导读:我一直试图让我的应用程序在heroku上工作.我可以在本地运行它运行良好,但是当我部署到heroku时,我收到以下错误: 2012-05-18T21:26:18+00:00 app[web.1]: (in /app/app/assets/javascripts/application.js.erb)):2012-05-18T21:26:18+00:00 app[web.1]: 8: %
我一直试图让我的应用程序在heroku上工作.我可以在本地运行它运行良好,但是当我部署到heroku时,我收到以下错误:

2012-05-18T21:26:18+00:00 app[web.1]:   (in /app/app/assets/javascripts/application.js.erb)):
2012-05-18T21:26:18+00:00 app[web.1]:     8:   <%= render 'layouts/shim'%>
2012-05-18T21:26:18+00:00 app[web.1]: ActionView::Template::Error (Unexpected character '#'
2012-05-18T21:26:18+00:00 app[web.1]:     4:   <title><%= full_title(yield(:title))%></title>
2012-05-18T21:26:18+00:00 app[web.1]: 
2012-05-18T21:26:18+00:00 app[web.1]:     5:   <%= stylesheet_link_tag    "application",:media => "all" %>
2012-05-18T21:26:18+00:00 app[web.1]:     7:   <%= csrf_meta_tags %>
2012-05-18T21:26:18+00:00 app[web.1]:     3: <head>
2012-05-18T21:26:18+00:00 app[web.1]:     6:   <%= javascript_include_tag "application" %>
2012-05-18T21:26:18+00:00 app[web.1]:   app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___39687462904242755_48413880'
2012-05-18T21:26:18+00:00 app[web.1]: 
2012-05-18T21:26:18+00:00 app[web.1]: 
 9: </head>

最初我认为这是一个coffeescript问题.但我已经摆脱了任何.coffee文件只是为了看它是否会起作用.仍然是同样的结果

这是我的application.js文件:

//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require_tree .

$(document).ready(function()
 {  

    function setCountdownTimer(element,year,month,day) {
        var date = new Date(year,day);
        $(element).countdown({until: date});
    }


    $('#hashtag_id').live('change',function() {
      $('#user_comments').empty();
      $.ajax({ url: '/headlines/update_comments/',data: {hashtag: this.value,id: $('#headline_tag').data('id')},success: function(data) {
            $('#user_comments').html(data);
          }
      })
    });

});

有任何想法吗?

解决方法

您是否已将任何咖啡脚本文件更改为js文件,并将注释保留在顶部:

# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

如果是这样,请删除这些注释.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读