Bundle install issues for Catalina

Just upgraded to Catalina and my current Jekyll Blog won’t run when I put “bundle exec jekyll serve”

I get this error when trying to bundle install -

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

I had that issue and can’t remember exactly how I fixed it.
But I found:
gem pristine http_parser.rb --version 0.6.0
in my .bash_history fwiw

Thank you for the response, from there you were able to “bundle install” this didn’t give you any issues to your mac?

What is the output when you run install http parser? Success or failure?

keine probleme bisher … no problems so far

You can also try

gem install --user-install bundler

I believe this told me I did not have permission to install http parser

Hmm

Run

gem install http_parser.rb --user-install

That will install to ~/.gem so you don’t need sudo to install to /usr/lib/…

does it matter if i’m in zsh and not bash?

No, this will work for Bash and ZSH

Make sure you add .gem to your bashrc or zshrc file though so bundle can run the gem after you install it

export GEM_PATH="$HOME/.gem/ruby/X.X.0/bin"
export PATH="$GEM_PATH:$PATH"

Use 2.6.0 or 2.7.0 depending on your ruby vsn

Thank you Michael, I don’t know why but for whatever reason I was able to bundle install this morning. I now can preview on local host.

Thanks for your help, not sure why but I was able to bundle install without error this morning. Maybe my computer needed a day to rethink it’s priorities :slight_smile:

1 Like

Scratch that, I exited and then went back in and am getting the same errors

2usmstahl:blog stahl$ bundle exec jekyll serve
Could not find http_parser.rb-0.6.0 in any of the sources
Run bundle install to install missing gems.

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

then when I try to install it I get that I do not have permission

ok so if I’m in zsh, how do I add the gem - I tried
export GEM_PATH="$HOME/.gem/ruby/2.6.0/bin"
export PATH="$GEM_PATH:$PATH"

but didn’t have success.

I’m not sure what is up it worked a minute ago then I exited VSC and went back in to try again and no dice when running bundle exec jekyll serve

getting the Could not find http_parser.rb-0.6.0 in any of the sources

Also when i’m in bash and just run jekyll -v I get the following

2usmstahl:blog stahl$ jekyll -v
Traceback (most recent call last):
12: from /Users/stahl/.rbenv/versions/2.6.3/bin/jekyll:23:in <main>' 11: from /Users/stahl/.rbenv/versions/2.6.3/bin/jekyll:23:in load’
10: from /Users/stahl/.gem/ruby/2.6.0/gems/jekyll-4.1.1/exe/jekyll:11:in <top (required)>' 9: from /Users/stahl/.gem/ruby/2.6.0/gems/jekyll-4.1.1/lib/jekyll/plugin_manager.rb:52:in require_from_bundler’
8: from /Users/stahl/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler.rb:107:in setup' 7: from /Users/stahl/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/runtime.rb:20:in setup’
6: from /Users/stahl/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/runtime.rb:108:in block in definition_method' 5: from /Users/stahl/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/definition.rb:226:in requested_specs’
4: from /Users/stahl/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/definition.rb:237:in specs_for' 3: from /Users/stahl/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/definition.rb:170:in specs’
2: from /Users/stahl/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/spec_set.rb:85:in materialize' 1: from /Users/stahl/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/spec_set.rb:85:in map!’
/Users/stahl/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/spec_set.rb:91:in `block in materialize’: Could not find ffi-1.9.25 in any of the sources (Bundler::GemNotFound)
2usmstahl:blog stahl$

ah, I use rvm on this machine…

If you run export then it only works for current session so Jekyll runs. But when you exit VSC you lose it

So make sure to persist it

Edit

~/.zshrc

Add both export lines there
Restart your terminal in VSC - delete and make a new one

Then run Jekyll

I don’t know how rvm works but it will be similar idea

Make sure that rvm is setup as per its docs so you have gems for the current ruby environment accessible.

@Stahlwalker I also had issues with http_parser.rb, but this suggestion seems to work for me. Also, from your traceback, I see an issue with ffi. I had to run brew install libffi for it to work. I am not sure if it helps, but thought I’d share this link as well, which summarises all issues I had with setting up Jekyll on Catalina.