ElasticBeanstalk-Rails Nokogiri部署问题 [英] ElasticBeanstalk - Rails Nokogiri Deployment Issue

查看:46
本文介绍了ElasticBeanstalk-Rails Nokogiri部署问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个通过ElasticBeanstalk部署到EC2的工作Rails应用程序.我每隔几周更新一次网站,没有任何问题.今天,在提交更改并运行"eb deploy"之后,我遇到了一个问题:

I have a working rails application deployed to EC2 through ElasticBeanstalk. I update the website every few weeks without issue. Today I'm running into a problem after committing changes and running "eb deploy":

An error occurred while installing nokogiri (1.7.0.1), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.7.0.1'` succeeds before bundling.

除了一些观点外,我没有做任何改变.主机是相同的,Gemfile是相同的.在我的本地计算机上,我可以运行该命令,然后无问题地捆绑安装/更新.我可以SSH到EC2主机并成功运行该命令以安装该版本的Nokogiri.

I haven't changed anything aside from a few views. The host is the same and the Gemfile is the same. On my local machine, I can run that command and then bundle install/update without issue. I can SSH to the EC2 host and successfully run that command to install that version of Nokogiri, too.

当我部署时,我收到该错误消息(没有其他详细信息).我被卡住了-知道下一步要做什么吗?请注意,这开始是在正常工作的设置下发生的,因此我认为不是主机缺少libxml或其他依赖项.

When I deploy, I get that error message (with no other details). I'm stuck - Any idea what I should look into next? Note that this started happening to a working setup, so I don't think it's the host missing libxml or another dependency.

推荐答案

找到了它.日志文件中有一行我不见了.

Found it. There was a line in the log file that I was missing.

无法分配内存"

Rails使用的内存比我想象的要多得多.仅坐在那里,它就使用了1.7GB(2.0GB)中的一个.我暂时添加了1GB的交换空间,部署成功.

Rails was using a lot more memory than I thought. Just sitting there it was using 1.7GB out of 2.0GB. I temporarily added 1GB of swap and the deployment succeeded.

这篇关于ElasticBeanstalk-Rails Nokogiri部署问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆