【问题标题】:Bundle install killed message?捆绑安装被杀消息?
【发布时间】:2016-02-19 09:25:41
【问题描述】:

我在服务器机器上运行捆绑安装 - 数字海洋,它总是像这样被杀死:

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


    【解决方案1】:

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

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

    【讨论】:

    • 是的,这正是我在使用默认的 Vagrant 盒子 (512MB) 并且在盒子内 nokogiri 被杀死时所用的
    • 也因为 vagrant box 无法完成安装 gem 而得到。将 ram 增加到 1024mb 使其工作。
    【解决方案2】:

    我想我也得到过一次。

    我在 DO 中解决了它

    Rail on Rails 一键式应用程序上的 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 From man su

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

    有关一键式应用程序的更多信息,请查看:

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

    【讨论】:

      猜你喜欢
      • 2016-12-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-14
      • 1970-01-01
      相关资源
      最近更新 更多