简体   繁体   English

rails + dokku bundle在第一次尝试部署时失败

[英]rails + dokku bundle fails when trying to deploy for the first time

I'm trying to deploy my rails app with Dokku. 我正在尝试使用Dokku部署我的rails应用程序。 I added git remote to my repository and it starts deploying when I push remote, but it stops with this message: 我在我的存储库中添加了git remote,当我推送远程时它开始部署,但是它停止了这条消息:

Killed. Failed to install gems via Bundler.

! [remote rejected] master -> master (pre-receive hook declined)
  • the gem at which it stops changes. 它停止变化的宝石。
  • It's my first time deploying to dokku. 这是我第一次部署到dokku。

turns out that upgrading my droplet to a bigger one did the trick, and deployment worked. 事实证明,将我的Droplet升级到更大的Dropt就可以了,并且部署工作正常。 so seems like it needed something bigger than the smallest droplet. 所以看起来它需要比最小的液滴更大的东西。

I just had a similar/same issue and solved it by enabling a swapfile. 我只是有一个类似/相同的问题,并通过启用交换文件解决它。

While creating a bigger droplet works you aren't solving the real issue: The system runs out of memory while installing the gems. 在创建更大的Droplet工作时,您无法解决实际问题:系统在安装gem时内存不足。

On a 'normal' system this wouldn't be a problem since we'd have a swapfile. 在“正常”系统上,这不是问题,因为我们有一个交换文件。 DigitalOcean does not have a default swapfile. DigitalOcean没有默认的交换文件。 Some reason this is to make people thing they need bigger droplets. 有些原因是为了让人们需要更大的水滴。 While this solves the issue of installing your gems, you are doing it at a much higher yearly cost. 虽然这解决了安装宝石的问题,但您每年的成本要高得多。

Instead, just create a swapfile. 相反,只需创建一个交换文件。 Ironically DigitalOcean has a great guide for this: http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/ 具有讽刺意味的是,DigitalOcean有一个很好的指南: http//dokku.viewdocs.io/dokku/getting-started/troubleshooting/

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

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