简体   繁体   中英

A error came when i try gem install bootsnap -v '1.7.2

An error occurred while installing bootsnap (1.7.2), and Bundler cannot continue. Make sure that gem install bootsnap -v '1.7.2' --source 'https://rubygems.org/' succeeds before bundling.

In Gemfile: bootsnap

You can just run the line in the terminal in order to install the right bootsnap version.

gem install bootsnap -v '1.7.2' --source 'https://rubygems.org/'

Or alternatively you can run bundle update bootsnap and then bundle install

I had the same issue on my mac.

In the error message I saw next line xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

It solves by running xcode-select --install

First of all, check which bundler version you are using. Bundler version greater than 1 and ruby version greater than 2 is required. And check for the rails version also, use the rails version greater than 5.

You can check gem dependency on the below location

https://rubygems.org/gems/bootsnap/

If all the above things are fine then you hadn't installed some of the system packages required to run ruby or ruby on rails. You can install some of them using the below commands.

sudo apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev

sudo apt-get install git-core zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn

If you can't resolve the problem, Let me know in the comments which ruby, rails, and bundler version you are using.

Try to run xcode-select --install

Then run gem install bootsnap -v '1.7.3' --source 'https://rubygems.org/'

Or another version of bootsnap, depending of your needing

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM