Why is bundle install not working?

Hello! I am very new to jekyll.

When I enter bundle install , I get

Fetching gem metadata from https://rubygems.org/.........

Resolving dependencies...

Could not find gem 'http_parser.rb (= 0.8.0)' with platform 'x86_64-darwin-21' in rubygems repository https://rubygems.org/ or installed locally.

The source contains the following gems matching 'http_parser.rb (= 0.8.0)':

* http_parser.rb-0.8.0

I am unsure of why this is happening, even though I have tried installing the exact version it asks for.

If you have any suggestions, please let me know!

Thank you!

what OS are you on?

Can you post the full output of the console when you run the command?

If you are on a mac it seems to be a common issue that you end up with more than one installation of Ruby and you may be installing http parser in one ruby instance but bundler is using another. You can sometimes see this in the console logs if you look at the path for each thing - if you see 2 different paths then that usually means there is more than one ruby instance installed. Solution is usually to uninstall and reinstall ruby.

Hi, rydar!

I am currently on macOS Monterey, Version 12.3.1.

That is all the text that shows after I enter bundle install .


Do I console.log the ruby versions via the command below?

ls ~/.rubies/

If so, the output would be

ruby-3.1.2	ruby-3.1.3	ruby-3.2.0

I also tried the command

which -a ruby 

Which gave me

/Users/thisuserrighthere/.rubies/ruby-3.1.2/bin/ruby
/usr/bin/ruby

One more command I used was

cat ~/.zshrc

Which gave me this, I don’t know if it is useful or not:


export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
source /usr/local/opt/chruby/share/chruby/chruby.sh
source /usr/local/opt/chruby/share/chruby/auto.sh
chruby ruby-3.1.2 # run chruby to see actual version
chruby ruby-3.1.2
chruby ruby-3.1.2
chruby ruby-3.1.2
chruby ruby-3.1.2
source /usr/local/opt/chruby/share/chruby/chruby.sh
source /usr/local/opt/chruby/share/chruby/auto.sh
chruby ruby-3.1.2
chruby ruby-3.1.2

I believe I am switching to the right version by entering

chruby 3.1.2

Just to be sure, which command would I need to use to uninstall all the versions if I followed Jekyll’s installation process for macOS? I don’t know if it is through HomeBrew.

I found this link, I hope it looks like the right process to uninstall ruby: Uninstall Ruby · Mac Install Guide

Thank you!

I’m not a mac user so can’t really help on how to do it - but I would uninstall ruby and re-install it and see what happens. My guess is you are doing things with multiple versions of ruby somehow.