简体   繁体   English

将Rails部署到Amazon EC2-很抱歉,出了点问题

[英]Deploying Rails to Amazon EC2 - We're sorry, but something went wrong

I've been following the rails cast to deploy my application to amazon ec2 and I'm having some problems. 我一直在跟踪将我的应用程序部署到Amazon EC2的过程,但是遇到了一些问题。 It took me a while, but i got a test "blog" application deployed successfully yesterday using rubber and it's create_staging method. 我花了一段时间,但昨天我使用橡胶及其create_staging方法成功部署了一个测试“博客”应用程序。 I am now trying to deploy my actual app but have run into some difficulties. 我现在正在尝试部署我的实际应用程序,但是遇到了一些困难。 The rubber command finishes, but when I try to access the website through the browser, I get the standard "We're sorry, but something went wrong error". 橡胶命令完成了,但是当我尝试通过浏览器访问该网站时,我得到的标准是“很抱歉,但是出现了一些错误”。

Look at the log files I hear you say, but when I log into the server through SSH as the ubuntu user and type ls nothing is returned - like there are no files on the server, when I know there are? 查看我听到的日志文件,但是当我以ubuntu用户的身份通过SSH登录服务器并键入ls什么都不会返回-就像服务器上没有文件,什么时候知道?

Any help really appreciated! 任何帮助真的很感激!

Connecting to database specified by database.yml
Started GET "/login" for 77.100.120.24 at 2013-02-11 07:28:18 -0500
Processing by AccessController#login as HTML
  Rendered access/login.html.erb within layouts/admin (17.8ms)
Completed 500 Internal Server Error in 1082ms

ActionView::Template::Error (stylesheet.css isn't precompiled):
    4: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    5: <title>QLess - <%= @page_title || "Quick Drinks Ordering" %></title>
    6: <%= stylesheet_link_tag    "application", :media => "all" %>
    7: <%= stylesheet_link_tag    "stylesheet", :media => "all" %>
    8: <%= stylesheet_link_tag    "large_screen", :media => "all" %>
    9: <%= javascript_include_tag "application" %>
    10: <%= csrf_meta_tags %>
  app/views/layouts/admin.html.erb:7:in `_app_views_layouts_admin_html_erb__2871469925121006882_32798020'

login to your server through ssh, then cd to application path and then run cat log/production.log or tail -f log/production.log if you're running app in production mode. 通过ssh登录到服务器,然后使用cd登录到应用程序路径,然后运行cat log/production.log或运行tail -f log/production.log如果您在生产模式下运行应用程序)。 Else use environment name instead of "production" 其他使用环境名称代替“生产”

Upd: If you have other manifests or individual stylesheets and JavaScript files to include, you can add them to the precompile array: 更新:如果要包含其他清单或单个样式表和JavaScript文件,可以将它们添加到预编译数组中:

config.assets.precompile += ['admin.js', 'admin.css', 'swfObject.js']

from here: http://guides.rubyonrails.org/asset_pipeline.html#precompiling-assets 从这里开始: http : //guides.rubyonrails.org/asset_pipeline.html#precompiling-assets

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

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