Can't run bundle exec in ubuntu 20.04 with RVM

I run it in ubuntu 20.04 and as a rail user. When I run bundle install it ends with “Killed” not sure if that means anything. When I try to run

bundle exec rails -v

It respond with.

Could not find rails-7.0.4, sprockets-rails-3.4.2, puma-5.6.5, importmap-rails-1.1.5, turbo-rails-1.3.2, stimulus-rails-1.1.0, jbuilder-2.11.5, bootstrap-5.2.2, simple_form-5.1.0, ransack-3.2.1, bootstrap-select-rails-1.13.8, jquery-rails-4.5.0, sqlite3-1.5.3-x86_64-linux, sprockets-4.1.1, sassc-rails-2.1.2, sassc-2.4.0, tilt-2.0.11, ffi-1.15.5 in locally installed gems

My gemfile looks like this

source ""
git_source(:github) { |repo| "{repo}.git" }

ruby "3.1.0"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.0.4"

# The original asset pipeline for Rails []
gem "sprockets-rails"

# Use the Puma web server []
gem "puma", "~> 5.0"

# Use JavaScript with ESM import maps []
gem "importmap-rails"

# Hotwire's SPA-like page accelerator []
gem "turbo-rails"

# Hotwire's modest JavaScript framework []
gem "stimulus-rails"

# Build JSON APIs with ease []
gem "jbuilder"
# Use Redis adapter to run Action Cable in production
# gem "redis", "~> 4.0"

# Use Kredis to get higher-level data types in Redis []
# gem "kredis"

# Use Active Model has_secure_password []
 gem "bcrypt", "~> 3.1.7"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]

# Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", require: false

# Use Sass to process CSS
#gem "sassc-rails"
gem 'bootstrap', '~> 5.1', '>= 5.1.3'
gem 'simple_form'
gem 'ransack'
gem 'bootstrap-select-rails'
gem 'jquery-rails'
gem 'sqlite3'
# Use Active Storage variants []
# gem "image_processing", "~> 1.2"

group :development, :test do
  # See
  gem "debug", platforms: %i[ mri mingw x64_mingw ]
  gem 'i18n-debug'

group :development do
  # Use console on exceptions pages []
  gem "web-console"

  # Add speed badges []
  # gem "rack-mini-profiler"

  # Speed up commands on slow machines / big apps []
  # gem "spring"

group :test do
  # Use system testing []
  gem 'timecop'
  gem "capybara"
  gem "selenium-webdriver"
  gem "webdrivers"

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @eatingdarkcyanmantaray,

In addition to Bobby’s good advice, you could try the following:

Upgrade RubyGems

gem update --system

Upgrading apps from Bundler 1 to Bundler 2

bundle update --bundler

and finally try again

bundle install

Let me know how it goes,

Sergio Turpín

Bobby Iliev
Site Moderator
Site Moderator badge
November 3, 2022

Hi there,

It sounds like your server might be running out of RAM.

What I could suggest is adding a swap file so that you could have some extra buffer:

Also, you could try adding extra RAM as well.

Let me know how it goes!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.