Skip to content

Installing to vendor/bundle appears to be broken #647

@pixeltrix

Description

@pixeltrix

Whilst this appears to be similar to #646 this app does not have json_pure in the bundle.

Running bundle install inside a Debian Bullseye based docker image works fine, but running bundle install --path vendor/bundle breaks with the following error:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/app/vendor/bundle/ruby/3.0.0/gems/appsignal-3.13.1/ext
/usr/local/bin/ruby -I /usr/local/lib/ruby/3.0.0 -r
./siteconf20241025-15-5udun9.rb extconf.rb
/usr/local/lib/ruby/3.0.0/json/common.rb:82:in `initialize': wrong number
of arguments (given 1, expected 0) (ArgumentError)
	from /usr/local/lib/ruby/3.0.0/json/common.rb:82:in `new'
	from /usr/local/lib/ruby/3.0.0/json/common.rb:82:in `create_fast_state'
	from /usr/local/lib/ruby/3.0.0/json/common.rb:75:in `generator='
	from /usr/local/lib/ruby/3.0.0/json/ext.rb:11:in `<module:Ext>'
	from /usr/local/lib/ruby/3.0.0/json/ext.rb:6:in `<module:JSON>'
	from /usr/local/lib/ruby/3.0.0/json/ext.rb:3:in `<top (required)>'
from
<internal:/usr/local/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in
`require'
from
<internal:/usr/local/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in
`require'
	from /usr/local/lib/ruby/3.0.0/json.rb:579:in `<module:JSON>'
	from /usr/local/lib/ruby/3.0.0/json.rb:575:in `<top (required)>'
from
<internal:/usr/local/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in
`require'
from
<internal:/usr/local/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in
`require'
from /app/vendor/bundle/ruby/3.0.0/gems/appsignal-3.13.1/ext/base.rb:7:in
`<top (required)>'
from
<internal:/usr/local/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in
`require'
from
<internal:/usr/local/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in
`require'
	from extconf.rb:3:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in
/app/vendor/bundle/ruby/3.0.0/gems/appsignal-3.13.1 for inspection.
Results logged to
/app/vendor/bundle/ruby/3.0.0/extensions/aarch64-linux/3.0.0/appsignal-3.13.1/gem_make.out

  /usr/local/lib/ruby/3.0.0/rubygems/ext/builder.rb:93:in `run'
/usr/local/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:47:in `block
in build'
  /usr/local/lib/ruby/3.0.0/tempfile.rb:317:in `open'
  /usr/local/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:26:in `build'
/usr/local/lib/ruby/3.0.0/rubygems/ext/builder.rb:159:in
`build_extension'
/usr/local/lib/ruby/3.0.0/rubygems/ext/builder.rb:193:in `block in
build_extensions'
  /usr/local/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:in `each'
/usr/local/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:in
`build_extensions'
/usr/local/lib/ruby/3.0.0/rubygems/installer.rb:837:in
`build_extensions'
/usr/local/bundle/gems/bundler-2.3.26/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/usr/local/bundle/gems/bundler-2.3.26/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/usr/local/bundle/gems/bundler-2.3.26/lib/bundler/source/rubygems.rb:207:in
`install'
/usr/local/bundle/gems/bundler-2.3.26/lib/bundler/installer/gem_installer.rb:54:in
`install'
/usr/local/bundle/gems/bundler-2.3.26/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/bundle/gems/bundler-2.3.26/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/usr/local/bundle/gems/bundler-2.3.26/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/usr/local/bundle/gems/bundler-2.3.26/lib/bundler/worker.rb:62:in
`apply_func'
/usr/local/bundle/gems/bundler-2.3.26/lib/bundler/worker.rb:57:in `block
in process_queue'
  /usr/local/bundle/gems/bundler-2.3.26/lib/bundler/worker.rb:54:in `loop'
/usr/local/bundle/gems/bundler-2.3.26/lib/bundler/worker.rb:54:in
`process_queue'
/usr/local/bundle/gems/bundler-2.3.26/lib/bundler/worker.rb:91:in `block
(2 levels) in create_threads'

An error occurred while installing appsignal (3.13.1), and
Bundler cannot continue.

It also fails with GHA running on Ubuntu 22.04 but works locally on my Mac using a chruby install of 3.0.7.

The app can be checked out here: SeneddCymru/e-petitions#220

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions