Closed ronaldtse closed 2 months ago
@ronaldtse Packaging for this sample works out of the box. Both on GHA (macos 13, 14 actions that I created) and locally on MacOS and Linux.
There is one small note. When you do packaging "in-place" like
tebako press -e app.rb -o sample.tebako -r ./
Tebako includes all files starting from the root folder into package and packaging "in-place" will force endless recursive inclusion of the previous version of the package into a new one.
It shall not cause packaging error though.
There is one strange thing in the error log. The list of Ruby gems that tebako attempted to deploy was not related to Sinatra sample Gemfile. It looks like a piece of metanorma.
I cannot imagine how that could happen.
The gems are related to Metanorma because this is a Ruby install that works with different Gemfiles. Why does tebako-runtime care about those other gems?
Also, if “in-place” packaging is not allowed, it must be rejected at the command line and documented.
I also realized that when I specified “-e” the CLI expects “-r” to also be set. That is different from what is stated in the README.
The gems are related to Metanorma because this is a Ruby install that works with different Gemfiles. Why does tebako-runtime care about those other gems?
When tebako does packaging it is supposed to run bundle install
for the Gemfile that defines a solution to be packaged.
At GHA run for sinatra sample I see
Resolving dependencies...
Fetching base64 0.2.0
Fetching bigdecimal 3.1.8
Fetching csv 3.3.0
Fetching mini_mime 1.1.5
Installing base64 0.2.0
Installing mini_mime 1.1.5
Installing csv 3.3.0
Fetching nio4r 2.7.3
Installing bigdecimal 3.1.8 with native extensions
Installing nio4r 2.7.3 with native extensions
Fetching rack 3.1.4
Installing rack 3.1.4
Fetching webrick 1.8.1
Installing webrick 1.8.1
Fetching tilt 2.4.0
Fetching mustermann 3.0.0
Installing tilt 2.4.0
Installing mustermann 3.0.0
Fetching rack-protection 4.0.0
Installing rack-protection 4.0.0
Fetching rack-session 2.0.0
Fetching rackup 2.1.0
Installing rack-session 2.0.0
Fetching sinatra 4.0.0
Installing rackup 2.1.0
Installing sinatra 4.0.0
Fetching puma 6.4.2
Installing puma 6.4.2 with native extensions
Fetching multi_xml 0.7.1
Installing multi_xml 0.7.1
Fetching httparty 0.22.0
Installing httparty 0.22.0
Bundle complete! 4 Gemfile dependencies, 18 gems now installed.
This correlates to the Gemfile. In your log I see
Ignoring bigdecimal-3.1.8 because its extensions are not built. Try: gem pristine bigdecimal --version 3.1.8
Ignoring bigdecimal-3.1.7 because its extensions are not built. Try: gem pristine bigdecimal --version 3.1.7
Ignoring bigdecimal-3.1.6 because its extensions are not built. Try: gem pristine bigdecimal --version 3.1.6
Ignoring bigdecimal-3.1.5 because its extensions are not built. Try: gem pristine bigdecimal --version 3.1.5
Ignoring bigdecimal-3.1.4 because its extensions are not built. Try: gem pristine bigdecimal --version 3.1.4
Ignoring commonmarker-0.23.10 because its extensions are not built. Try: gem pristine commonmarker --version 0.23.10
Ignoring date-3.3.4 because its extensions are not built. Try: gem pristine date --version 3.3.4
Ignoring date-3.3.3 because its extensions are not built. Try: gem pristine date --version 3.3.3
Ignoring debug-1.9.2 because its extensions are not built. Try: gem pristine debug --version 1.9.2
Ignoring debug-1.9.1 because its extensions are not built. Try: gem pristine debug --version 1.9.1
Ignoring debug-1.9.0 because its extensions are not built. Try: gem pristine debug --version 1.9.0
Ignoring debug-1.8.0 because its extensions are not built. Try: gem pristine debug --version 1.8.0
Ignoring debug-1.6.2 because its extensions are not built. Try: gem pristine debug --version 1.6.2
Ignoring debug-1.6.1 because its extensions are not built. Try: gem pristine debug --version 1.6.1
Ignoring emf2svg-1.0.0 because its extensions are not built. Try: gem pristine emf2svg --version 1.0.0
Ignoring expressir-1.2.9 because its extensions are not built. Try: gem pristine expressir --version 1.2.9
Ignoring expressir-1.0.0 because its extensions are not built. Try: gem pristine expressir --version 1.0.0
Ignoring extract_ttc-0.2.0 because its extensions are not built. Try: gem pristine extract_ttc --version 0.2.0
Ignoring ffi-1.16.3 because its extensions are not built. Try: gem pristine ffi --version 1.16.3
Ignoring ffi-1.15.4 because its extensions are not built. Try: gem pristine ffi --version 1.15.4
Ignoring ffi-1.15.0 because its extensions are not built. Try: gem pristine ffi --version 1.15.0
Ignoring io-console-0.7.2 because its extensions are not built. Try: gem pristine io-console --version 0.7.2
Ignoring io-console-0.7.1 because its extensions are not built. Try: gem pristine io-console --version 0.7.1
Ignoring io-console-0.6.0 because its extensions are not built. Try: gem pristine io-console --version 0.6.0
Ignoring io-event-1.5.1 because its extensions are not built. Try: gem pristine io-event --version 1.5.1
Ignoring io-event-1.5.0 because its extensions are not built. Try: gem pristine io-event --version 1.5.0
Ignoring io-event-1.4.4 because its extensions are not built. Try: gem pristine io-event --version 1.4.4
Ignoring io-event-1.4.2 because its extensions are not built. Try: gem pristine io-event --version 1.4.2
Ignoring io-event-1.3.3 because its extensions are not built. Try: gem pristine io-event --version 1.3.3
Ignoring io-event-1.2.3 because its extensions are not built. Try: gem pristine io-event --version 1.2.3
Ignoring json-2.7.2 because its extensions are not built. Try: gem pristine json --version 2.7.2
Ignoring json-2.7.1 because its extensions are not built. Try: gem pristine json --version 2.7.1
Ignoring json-2.6.3 because its extensions are not built. Try: gem pristine json --version 2.6.3
Ignoring libmspack-0.11.0 because its extensions are not built. Try: gem pristine libmspack --version 0.11.0
Ignoring libmspack-0.10.1 because its extensions are not built. Try: gem pristine libmspack --version 0.10.1
Ignoring nokogiri-1.11.7 because its extensions are not built. Try: gem pristine nokogiri --version 1.11.7
Ignoring oga-3.4 because its extensions are not built. Try: gem pristine oga --version 3.4
Ignoring ox-2.14.18 because its extensions are not built. Try: gem pristine ox --version 2.14.18
Ignoring ox-2.14.17 because its extensions are not built. Try: gem pristine ox --version 2.14.17
Ignoring ox-2.14.14 because its extensions are not built. Try: gem pristine ox --version 2.14.14
Ignoring ox-2.14.13 because its extensions are not built. Try: gem pristine ox --version 2.14.13
Ignoring ox-2.14.12 because its extensions are not built. Try: gem pristine ox --version 2.14.12
Ignoring ox-2.14.7 because its extensions are not built. Try: gem pristine ox --version 2.14.7
Ignoring ox-2.14.5 because its extensions are not built. Try: gem pristine ox --version 2.14.5
Ignoring ox-2.14.4 because its extensions are not built. Try: gem pristine ox --version 2.14.4
Ignoring prism-0.29.0 because its extensions are not built. Try: gem pristine prism --version 0.29.0
Ignoring prism-0.27.0 because its extensions are not built. Try: gem pristine prism --version 0.27.0
Ignoring prism-0.24.0 because its extensions are not built. Try: gem pristine prism --version 0.24.0
Ignoring prism-0.21.0 because its extensions are not built. Try: gem pristine prism --version 0.21.0
Ignoring prism-0.19.0 because its extensions are not built. Try: gem pristine prism --version 0.19.0
Ignoring prism-0.18.0 because its extensions are not built. Try: gem pristine prism --version 0.18.0
Ignoring prism-0.17.1 because its extensions are not built. Try: gem pristine prism --version 0.17.1
Ignoring prism-0.15.1 because its extensions are not built. Try: gem pristine prism --version 0.15.1
Ignoring psych-5.1.2 because its extensions are not built. Try: gem pristine psych --version 5.1.2
Ignoring psych-5.1.1.1 because its extensions are not built. Try: gem pristine psych --version 5.1.1.1
Ignoring psych-5.1.0 because its extensions are not built. Try: gem pristine psych --version 5.1.0
Ignoring racc-1.8.0 because its extensions are not built. Try: gem pristine racc --version 1.8.0
Ignoring racc-1.7.3 because its extensions are not built. Try: gem pristine racc --version 1.7.3
Ignoring racc-1.7.1 because its extensions are not built. Try: gem pristine racc --version 1.7.1
Ignoring racc-1.6.2 because its extensions are not built. Try: gem pristine racc --version 1.6.2
Ignoring racc-1.5.2 because its extensions are not built. Try: gem pristine racc --version 1.5.2
Ignoring redcarpet-3.6.0 because its extensions are not built. Try: gem pristine redcarpet --version 3.6.0
Ignoring redcarpet-3.5.1 because its extensions are not built. Try: gem pristine redcarpet --version 3.5.1
Ignoring rice-3.0.0 because its extensions are not built. Try: gem pristine rice --version 3.0.0
Ignoring ruby-ll-2.1.3 because its extensions are not built. Try: gem pristine ruby-ll --version 2.1.3
Ignoring seven-zip-1.4.2 because its extensions are not built. Try: gem pristine seven-zip --version 1.4.2
Ignoring stringio-3.1.0 because its extensions are not built. Try: gem pristine stringio --version 3.1.0
Ignoring stringio-3.0.8 because its extensions are not built. Try: gem pristine stringio --version 3.0.8
Ignoring stringio-3.0.5 because its extensions are not built. Try: gem pristine stringio --version 3.0.5
Ignoring strscan-3.1.0 because its extensions are not built. Try: gem pristine strscan --version 3.1.0
Ignoring tomlib-0.5.0 because its extensions are not built. Try: gem pristine tomlib --version 0.5.0
Ignoring unf_ext-0.0.9.1 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.9.1
Ignoring unf_ext-0.0.8 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.8
Ignoring unf_ext-0.0.7.7 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.7
Ignoring websocket-driver-0.7.6 because its extensions are not built. Try: gem pristine websocket-driver --version 0.7.6
'tebako-runtime' was not loaded.
Ignoring stringio-3.1.0 because its extensions are not built. Try: gem pristine stringio --version 3.1.0
Ignoring stringio-3.0.8 because its extensions are not built. Try: gem pristine stringio --version 3.0.8
Ignoring stringio-3.0.5 because its extensions are not built. Try: gem pristine stringio --version 3.0.5
<internal:~/.tebako/o/s/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:148:in `require': incompatible library version - ~/.gem/ruby/3.1.0/gems/psych-5.1.2/lib/psych.bundle (LoadError)
from <internal:~/.tebako/o/s/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:148:in `require'
from ~/.gem/ruby/3.1.0/gems/psych-5.1.2/lib/psych.rb:13:in `<top (required)>'
from <internal:~/.tebako/o/s/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:148:in `require'
from <internal:~/.tebako/o/s/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:148:in `require'
from ~/.tebako/o/s/lib/ruby/3.1.0/rubygems.rb:610:in `load_yaml'
from ~/.tebako/o/s/lib/ruby/3.1.0/rubygems/config_file.rb:346:in `load_file'
from ~/.tebako/o/s/lib/ruby/3.1.0/rubygems/config_file.rb:189:in `initialize'
from ~/.tebako/o/s/lib/ruby/3.1.0/rubygems/gem_runner.rb:71:in `new'
from ~/.tebako/o/s/lib/ruby/3.1.0/rubygems/gem_runner.rb:71:in `do_configuration'
from ~/.tebako/o/s/lib/ruby/3.1.0/rubygems/gem_runner.rb:33:in `run'
from ~/.tebako/o/s/bin/gem:21:in `<main>'
This is not related to the Gemfile.
There must be a step in this install step that somehow loops through installed gems. I am able to run the Sinatra app with no problem. It is possible that the gems with native extensions currently in the system are not compiled because I recently switched from 3.2 to 3.3, but this process is certainly doing something more than just using the Gemfile?
Tebako is calling ~/.tebako/o/s/bin/gem install tebako-runtime
and it looks for gems at ~/.gem/ruby/3.1.0
while it shall go to ~/.tebako/o/s/lib/gems
The issue is that I cannot reproduce it whatever I do so I will have to rely on some experiments run by you
I'm on a macOS running Ruby 3.3.2:
These commands are successful:
Yet I'm getting this error: