捆绑安装被杀消息?

时间:2016-02-19 09:25:42

标签: ruby-on-rails

我在服务器机器上运行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

我该怎么办?

2 个答案:

答案 0 :(得分:9)

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

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

答案 1 :(得分:3)

我想我也有过一次。

我在DO中解决了它

Rail on Rails One-Click应用程序上的ruby安装由RVM管理。如果您运行哪个捆绑包,则可以看到二进制文件已安装到:

# which bundle
/usr/local/rvm/gems/ruby-2.1.3/bin/bundle

rails用户没有登录shell,因此您需要手动获取文件/etc/profile.d/rvm.sh以访问Ruby安装。

您可以通过运行以下命令为rails用户设置正确的登录shell:

chsh -s /bin/bash rails

然后切换到用户:su - rails来自man su

 -, -l, --login
     Provide an environment similar to what the user would expect had the user logged in directly.

有关One-Click应用程序的更多信息,请查看:

How To Use the 1-Click Ruby on Rails on Ubuntu 14.04 Image