Getting Error (Exit Code 2) for Bootsnap, Not Allowing to Set Up Rails Server

Unable to install bootsnap version 1.4.4

There is problem with ruby version and bootsnap gem version.
so upgrade your ruby version '2.3.7' or '2.4.5' as per rails 5.2.3

Which Ruby on Rails is compatible with which Ruby version?

Ruby on rails errors

Well there could be many things, as you are new and some how got issue. Let us start to diagnose issue by following few commands, see what you get. Run following commands

node -v 

I have response of 12.10.0 you may have close to something, now check npm and yarn versions

npm -v

My npm is 6.11.3 and you should have something close to it.
Now check yarn version

yarn --version

My system has 1.17.3 version. Now if everything installed and you got no errors but version are older try to update at close to these version.

First check what version of msgpack is installed

gem info msgpack

It should be msgpack (1.3.1) as per your errors it has also same, also to be safe side check ruby version ruby -v it should ruby 2.6.3 version. If you are getting proper information and version of msgpack than it is fine but just do try following

gem uninstall msgpack

Now go in rails folder and run following command

bundle install

Now see if you get any error.

(New to Rails) rails server error: cannot load such file -- bootsnap/setup (LoadError)

You have an issue with the gem bootsnap which main job is to accelerate rails startup time.

So, you should either :

  • In case you want bootsnap, add gem 'bootsnap' to your gemfile to install it.
  • In case you don't want bootsnap, remove the line require 'bootsnap/setup' in config/boot.rb

More info about bootsnap : https://github.com/Shopify/bootsnap#how-does-this-work



Related Topics



Leave a reply



Submit