【问题标题】:Ruby Thin Server ActionView::Template ErrorRuby 瘦服务器 ActionView::Template 错误
【发布时间】:2019-02-21 02:13:48
【问题描述】:

我目前在将我的项目推送到 Amazon Web Services 上的实时环境然后访问域时遇到错误。

ActionView::Template::Error (Command 'java -jar /home/ubuntu/.rvm/gems/ruby-2.1.10@silk/gems/yui-compressor-0.12.0/lib/yui/../yuicompressor-2.4.8.jar --type css --charset utf-8 /tmp/yui_compress20190221-3152-1wh64vu' returned non-zero exit status
  (in /home/ubuntu/ssc-staging/app/assets/stylesheets/application.css)):
    7:     %meta{:'http-equiv' => "X-UA-Compatible", :content => "IE=edge,chrome=1"}/
    8:     %meta{:name => 'viewport', :content => 'width=device-width, initial-scale=1.0'}/
    9:     = favicon_helper
    10:     = stylesheet_link_tag 'application', "//ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css"
    11:     = yield :css
    12:     = javascript_include_tag 'application'
    13:     = yield :js
  app/views/layouts/application.html.haml:10:in `_app_views_layouts_application_html_haml___4483641441858119908_47087558678120'

此页面出现上述错误。

错误来自第 10 行,它是 jquery-ui.css 的样式表链接标记。如果我删除此行,我的项目将加载,尽管没有 css 样式。如果我在本地运行项目,它工作正常。

我没有对“application.html.haml”文件进行任何更改。如果我在以前的功能提交上进行回滚并部署,即使这些版本的构建工作顺利,也会出现相同的错误。

Ruby Web 服务器与 Nginx 结合使用很精简。

【问题讨论】:

  • 在链接开头硬编码httphttps是否有效?
  • 不幸的是,刚刚尝试过没有成功。

标签: jquery css ruby-on-rails-3 nginx thin


【解决方案1】:

我设法解决了这个问题。问题是 yui_compressor 需要在服务器环境中安装 java。安装完成后,一切都按原样运行。

【讨论】:

    猜你喜欢
    • 2013-03-13
    • 1970-01-01
    • 2014-02-16
    • 2023-03-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多