Could not find mini_portile2-2.8.1 in any of the sources

Hi!

I have the following error on my Lambdas each time I run it:

Could not find mini_portile2-2.8.1 in any of the sources

I did not deploy my app and the problem appeared suddenly.

Does someone have the same issue?

Thanks

The generated opt folder present in S3 has those 2 issues :

  • the mini_portile2-2.8.1.gemspec file is not present in the ruby/gems/2.7.0/specifications folder
  • the mini_portile2-2.8.1 folder is not present in the ruby/gems/2.7.0/gems folder

But I still don’t understand why Jets did not include those files in the opt folder while deploying.

Solution found! For a mysterious reason, the bundller did not installed the mini_portile2 while deploying and doing bundle install. So I added it in my Gemfile:

gem 'mini_portile2', '~> 2.8', '>= 2.8.1'

Thanks for the post. Interestingly, wondering if why it appeared suddenly. Maybe mini_portfile2 was another dependency that was resolved in the Gemfile.lock. Not worth spending more time on it, but you if run into something similar in the future, it might be useful to check out Gemfile.lock and see where the mini_port dependency was coming from. Thanks!

I’ve found that the best way to resolve this is by using a lambda layer with Nokogiri. In this case a layer with nokogiri (1.14.2) which also includes the transitive dependency mini_portile2 (~> 2.8.0)

I got this error before myself and had to resolve it with a Gemfile entry as well. In my case the error appeared when I tried downgrading to Jets 3.0.17 and it was version 2.5.0.

{
  "errorMessage": "Could not find mini_portile2-2.5.0 in any of the sources",
  "errorType": "Init<Bundler::GemNotFound>",
  "stackTrace": [
    "/var/runtime/gems/bundler-2.3.15/lib/bundler/definition.rb:486:in `materialize'",
    "/var/runtime/gems/bundler-2.3.15/lib/bundler/definition.rb:191:in `specs'",
    "/var/runtime/gems/bundler-2.3.15/lib/bundler/definition.rb:239:in `specs_for'",
    "/var/runtime/gems/bundler-2.3.15/lib/bundler/runtime.rb:18:in `setup'",
    "/var/runtime/gems/bundler-2.3.15/lib/bundler.rb:162:in `setup'",
    "/var/runtime/gems/bundler-2.3.15/lib/bundler/setup.rb:20:in `block in <top (required)>'",
    "/var/runtime/gems/bundler-2.3.15/lib/bundler/ui/shell.rb:136:in `with_level'",
    "/var/runtime/gems/bundler-2.3.15/lib/bundler/ui/shell.rb:88:in `silence'",
    "/var/runtime/gems/bundler-2.3.15/lib/bundler/setup.rb:20:in `<top (required)>'",
    "/var/lang/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'",
    "/var/lang/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'",
    "/var/task/handlers/functions/jets/base_path.rb:1:in `<top (required)>'",
    "/var/lang/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'",
    "/var/lang/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'"
  ]
}

Bummer. Haven’t reproduced yet. Wondering if this is related to bundler version. Let’s also note the bundler version if y’all run into it.

This feels similar to what was happening in:

In any case, think might add a deploy check to fail hard also before it gets to lambda. Im assuming it’s getting to lambda before the error surfaces. Issue is it’s going to be hard to add this sanity check unless can reproduce it. Please report bundler version when y’all get a chance. Thanks!