【发布时间】:2014-02-14 13:46:05
【问题描述】:
我有一个使用 postgresql 运行的基本 Rails 应用程序。在当地,它像蛤蜊一样快乐。我已经运行了 eb init、eb start 和 eb status,它们返回 url、状态就绪和健康绿色。在本地,我的更改显示在我的 rails 应用程序上(没有什么强烈的,只是某个不是 beanstalk 欢迎屏幕的根目录)。当我 git aws.push 它推送到正确的环境名称,愉快地按下并压缩对象,以“远程到”+长字符串+“HEAD -> master(强制更新)”结束。
我等到 git "eb status" 再次变为绿色(它表示最初正在更新,所以它显然会转到正确的位置),然后转到指定的 url...并且 beanstalk 问候仍然存在。
(不再相关;似乎此解决方案仅适用于早期版本的 rails;保留它以使评论清晰)此人 (Amazon Web Services Beanstalk, git aws.push appears to push, but doesn't change anything) 有类似的问题,但是当我键入“git rm public/index .html” 我得到“致命:pathspec 'public/index.html' 不匹配任何文件”。
我使用的是 Rails 4.0.1。有任何想法吗?
编辑:
我认为问题可能与未使用 RDS 有关;当我使用一个时,这个问题不存在。但是在这个应用程序上,我试图运行一个本地 Postgresql,类似于我在 Heroku 上的运行方式......
编辑:
我的路线文件
App::Application.routes.draw do
resources :users
root "users#show"
end
编辑:
看看 EC2,它在最近的活动中声明
Instance: i-9ebf03b0 Module: AWSEBAutoScalingGroup ConfigSet: null] Command failed on instance.
Return code: 1 Output: Error occurred during build: Command hooks failed.
查看日志我看到了这个:
Installing pg (0.17.1)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9 extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with --with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more details. You
may need configuration options
根据上述情况,研究和尝试各种事情;只是想保持帮助,询问人们更新:)
【问题讨论】:
-
public/index.html 已在 rails 4.0 中默认被删除,因此该文件将不可用。
-
用你的配置/路由文件更新 qsn
-
您能否对 qsn 和 config/routes 文件更具体一点?我不知道 qsn 代表什么...
-
可以使用您的 rails 应用程序中的 config/routes 文件更新您的问题
-
有问题的解决方案指向使用 rails 3.2.4 的应用程序。此版本在创建 rails 应用程序时创建 public/index.html。当 Morgan 使用不包含 public/index.html 文件的 rails 4 时。
标签: ruby-on-rails amazon-web-services amazon-elastic-beanstalk