简体   繁体   English

Ruby on Rails应用程序在本地运行,但不在实时服务器上运行

[英]Ruby on Rails app working locally but not on live server

Everything is working perfectly locally but when I tried to put the app live I've got this error: 一切在本地都能正常运行,但是当我尝试将应用程序投入使用时,出现了以下错误:

Showing /home/rails/app/views/layouts/application.html.erb where line #9 raised: 

end of file reached
  (in /home/rails/app/assets/stylesheets/global.css.scss)

this is line 9 这是第9行

<%= stylesheet_link_tag "application" %>

when I remove this line I get errors for javascript: 当我删除此行时,会出现JavaScript错误:

<%= javascript_include_tag "vendor/modernizr" %>

What is the issue and how can it be fixed? 问题是什么,如何解决? Also not sure about the "end of file reached global.css.scss?" 还不确定“文件到达了global.css.scss的末尾吗?”

below is this: 下面是这个:

app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb__92412405316489023_40891780'

app/controllers/site_controller.rb:42:in `index'

On line 42 is the word "render" 第42行是单词“ render”

  def index
    render
  end

Many thanks 非常感谢

It should have something to do with precompile. 它应该与预编译有关。 Try cleaning the asset precompile temp folder. 尝试清理资产预编译临时文件夹。

If that doesn't solve it, pl post the stack trace. 如果那不能解决问题,请发布堆栈跟踪。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM