Search code examples
ruby-on-railsserverubuntu-20.04ruby-on-rails-7ruby-3.1

Can't run rails -v in proejct folder on ubuntu 20.04 server


Ruby version: 3.1.0 Rails version: 7.0.4 RVM 1.29.12 Ubuntu 20.04 It is a digital ocean droplet

I have SSH'ed into an ubuntu 20.04 server. I have installed rvm and rails. If I stand in the rails user folder and write rails -v it gives me the rail version. If I go into a project folder and try the same thing it just says.

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
Run `bundle install` to install missing gems.

Running bundle install ends with the text "Killed" My bundle config is

---
BUNDLE_DEPLOYMENT: "true"
BUNDLE_WITHOUT: "development:test"
BUNDLE_PATH: "vendor/bundle"

It seems bundle install doesn't install ffi 1.15.5 correct.

Installing ffi 1.15.5 with native extensions
Killed

and it does that everytime I run bundle install

I tried to run rails -v in the rails user folder and it gives the rails version. If I try in the project folder It throws an error and ask me to run bundle install. I run bundle install and it seems to finish without issues, but it doesn't fix the problem


Solution

  • Solved it by upgrading the server to 1 gb ram instead of 512 mb