Could not find nokogiri-1.10.9 in any of the sources

I did a bundle update jets recently and re-deployed my Jets app, and this error started happening on all functions. Weird, because the gem installed fine locally and the deploy succeeded without errors. I didn’t notice this right away because it crashes too early for the error to be sent to my error reporting app (Rollbar).

I fixed it by pinning nokogiri to 1.10.8 and re-bundling. It looks like 1.10.9 is only a couple days old.

I recall that there was something special about native compiled gems like nokogiri.

Any way to get an advance notification of a problem like this, or catch this in the deploy process so it can rollback before affecting the application?

Init error when loading handler handlers/controllers/orders_controller.create
{
"errorMessage": "Could not find nokogiri-1.10.9 in any of the sources",
"errorType": "Init<Bundler::GemNotFound>",
"stackTrace": [
"/var/runtime/gems/bundler-2.1.4/lib/bundler/spec_set.rb:86:in `block in materialize'",
"/var/runtime/gems/bundler-2.1.4/lib/bundler/spec_set.rb:80:in `map!'",
"/var/runtime/gems/bundler-2.1.4/lib/bundler/spec_set.rb:80:in `materialize'",
"/var/runtime/gems/bundler-2.1.4/lib/bundler/definition.rb:170:in `specs'",
"/var/runtime/gems/bundler-2.1.4/lib/bundler/definition.rb:237:in `specs_for'",
"/var/runtime/gems/bundler-2.1.4/lib/bundler/definition.rb:226:in `requested_specs'",
"/var/runtime/gems/bundler-2.1.4/lib/bundler/runtime.rb:101:in `block in definition_method'",
"/var/runtime/gems/bundler-2.1.4/lib/bundler/runtime.rb:20:in `setup'",
"/var/runtime/gems/bundler-2.1.4/lib/bundler.rb:149:in `setup'",
"/var/runtime/gems/bundler-2.1.4/lib/bundler/setup.rb:20:in `block in <top (required)>'",
"/var/runtime/gems/bundler-2.1.4/lib/bundler/ui/shell.rb:136:in `with_level'",
"/var/runtime/gems/bundler-2.1.4/lib/bundler/ui/shell.rb:88:in `silence'",
"/var/runtime/gems/bundler-2.1.4/lib/bundler/setup.rb:20:in `<top (required)>'",
"/var/lang/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:92:in `require'",
"/var/lang/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:92:in `require'",
"/var/task/handlers/controllers/orders_controller.rb:1:in `<top (required)>'",
"/var/lang/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:72:in `require'",
"/var/lang/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:72:in `require'"
]
}
1 Like

It happends to me too, how did exactly you re-bundling it??

add to your Gemfile:

gem 'nokogiri', '1.10.8'

then run

> bundle update nokogiri

when deploying, make sure you activate the bundled gems:

> bundle exec jets deploy
2 Likes

Thank you! It worked

Yeah it worked to me too :smiley: thanks man

RE: Any way to get an advance notification of a problem like this, or catch this in the deploy process so it can rollback before affecting the application?

Bummer! :pensive: Thanks for reporting. This is an important one.

The jets deploy normally stops when native gems are not found. However, in this case, nokogiri-1.10.9 gem was actually found. Recently, updated the lambdagems build process to prepare for ruby 2.7 support: https://github.com/tongueroo/jets/issues/444 This is actually one of the pieces needed for ruby 2.7 support and will take some time.

There was something weird with the nokogiri-1.10.9 gem though. Made some updates and rebuilt nokogiri-1.10.9 and now it works.

There’s actually several checks that run to validate the built gems, including launching instances, extracting the gems, and testing. Might have to add additional improvements. :face_with_monocle:

So the jets deploy should normally stop. Unsure how to notify further right now. :thinking: Think will handle on the QA lambdagems and jets side instead for now.

Should be working again now. Just tested.