nabu
By:
nabu

Bundle install gets killed

September 30, 2016 2.9k views
Ruby on Rails Ubuntu

Hello,

I have been following this tutorial on how to get started with Ruby on Rails:

https://www.digitalocean.com/community/tutorials/how-to-use-the-ruby-on-rails-one-click-application-on-digitalocean

But got stuck when running bundle install, the install gets killed halfway...

root@X:/home/rails/sample_tasks# bundle install
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.4.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.0
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.1
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Killed

Any ideas on how to resolve?

3 Answers

It's because you are running out of memory.
Try adding more swap: https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04
Or bump up to a bigger droplet.

by Etel Sverdlov
Linux swaps allow a system to harness more memory than was originally physically available. Here's how to set up a linux swap file on Ubuntu 12.04

Great, bumping up to 1GB RAM resolved the issue.
It was the gem nokogiri that broke the install.
Thank you for your fast response!

Adding more swap was the correct answer! Thank you so much!

Have another answer? Share your knowledge.