捆绑安装杀死消息?

问题描述 投票:0回答:2

我在服务器机器上运行

bundle install
- 数字海洋,它总是像这样被杀死:

RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too,
you can ignore these warnings with 'rvm rvmrc warning ignore /home/rails/car_main/Gemfile'.
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.

Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as
root will break this application for all non-root users on this machine.
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.5.0
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.4
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.0
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.0.0
Killed

我该怎么办?

ruby-on-rails
2个回答
16
投票

我在使用 DigitalOcean 时遇到了类似的问题,通过将 RAM 从 512MB 增加到 1GB 来解决。

或者,您也可以创建一个交换文件,但我选择增加 RAM。


1
投票

就我而言,这是由于 RAM 短缺引起的。

为了确保这是问题所在: 在

htop
运行时打开
bundle
,查看内存使用率是否达到 100%

要解决此问题,请执行以下操作之一:

A.按照 +haris 的建议获取更多 RAM 或交换空间

B.看看是什么占用了你的机器 RAM 并关闭一些服务(在我的例子中,我试图在服务运行时更新它,而 2GB 机器没有足够的 RAM 来同时运行这两个服务)

© www.soinside.com 2019 - 2024. All rights reserved.