sparklemotion / nokogiri

Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
https://nokogiri.org/
MIT License
6.15k stars 898 forks source link

[install] Rails 7 with TruffleRuby does fail on nokogiri installation #2604

Closed mrwormhole closed 2 years ago

mrwormhole commented 2 years ago

Have you read and followed the installation tutorial at http://www.nokogiri.org/tutorials/installing_nokogiri.html?

What is the complete output of gem install or bundle install?

Using rails 7.0.3.1
Bundle complete! 14 Gemfile dependencies, 71 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
         run  bundle binstubs bundler
       rails  importmap:install
rails aborted!
/home/mrwormhole/.rbenv/versions/truffleruby-dev/lib/gems/gems/nokogiri-1.13.8-x86_64-linux/lib/nokogiri/3.0/nokogiri.so: undefined symbol: rb_eTypeError
<internal:core> core/kernel.rb:293:in `require_relative'
<internal:core> core/kernel.rb:293:in `require_relative'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
/home/mrwormhole/Desktop/Hobby/Rails/yolo_app/config/application.rb:3:in `<top (required)>'
<internal:core> core/kernel.rb:293:in `require_relative'
/home/mrwormhole/Desktop/Hobby/Rails/yolo_app/Rakefile:4:in `<top (required)>'
<internal:core> core/kernel.rb:376:in `load'
<internal:core> core/kernel.rb:376:in `load'
<internal:core> core/kernel.rb:234:in `gem_original_require'
bin/rails:4:in `<main>'
(See full trace by running task with --trace)
       rails  turbo:install stimulus:install
rails aborted!
/home/mrwormhole/.rbenv/versions/truffleruby-dev/lib/gems/gems/nokogiri-1.13.8-x86_64-linux/lib/nokogiri/3.0/nokogiri.so: undefined symbol: rb_eTypeError
<internal:core> core/kernel.rb:293:in `require_relative'
<internal:core> core/kernel.rb:293:in `require_relative'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
/home/mrwormhole/Desktop/Hobby/Rails/yolo_app/config/application.rb:3:in `<top (required)>'
<internal:core> core/kernel.rb:293:in `require_relative'
/home/mrwormhole/Desktop/Hobby/Rails/yolo_app/Rakefile:4:in `<top (required)>'
<internal:core> core/kernel.rb:376:in `load'
<internal:core> core/kernel.rb:376:in `load'
<internal:core> core/kernel.rb:234:in `gem_original_require'
bin/rails:4:in `<main>'

If installation completed but is broken, what is the complete output from nokogiri -v?

# Nokogiri (1.13.8)
    ---
    warnings: []
    nokogiri:
      version: 1.13.8
      cppflags:
      - "-I/home/mrwormhole/.rbenv/versions/truffleruby-dev/lib/gems/gems/nokogiri-1.13.8/ext/nokogiri"
      - "-I/home/mrwormhole/.rbenv/versions/truffleruby-dev/lib/gems/gems/nokogiri-1.13.8/ext/nokogiri/include"
      - "-I/home/mrwormhole/.rbenv/versions/truffleruby-dev/lib/gems/gems/nokogiri-1.13.8/ext/nokogiri/include/libxml2"
      ldflags: []
    ruby:
      version: 3.0.3
      platform: x86_64-linux
      gem_platform: x86_64-linux
      description: truffleruby 22.3.0-dev-0e42c2a6, like ruby 3.0.3, GraalVM CE Native
        [x86_64-linux]
      engine: truffleruby
    libxml:
      source: packaged
      precompiled: false
      patches:
      - 0001-Remove-script-macro-support.patch
      - 0002-Update-entities-to-remove-handling-of-ssi.patch
      - 0003-libxml2.la-is-in-top_builddir.patch
      - 0004-use-glibc-strlen.patch
      - 0005-avoid-isnan-isinf.patch
      - 0006-update-automake-files-for-arm64.patch
      - '0008-htmlParseComment-handle-abruptly-closed-comments.patch'
      - '0009-allow-wildcard-namespaces.patch'
      libxml2_path: "/home/mrwormhole/.rbenv/versions/truffleruby-dev/lib/gems/gems/nokogiri-1.13.8/ext/nokogiri"
      memory_management: ruby
      iconv_enabled: true
      compiled: 2.9.14
      loaded: 2.9.14
    libxslt:
      source: packaged
      precompiled: false
      patches:
      - 0001-update-automake-files-for-arm64.patch
      datetime_enabled: true
      compiled: 1.1.35
      loaded: 1.1.35
    other_libraries:
      libgumbo: 1.0.0-nokogiri

If installation failed during compilation, what are the complete contents of the mkmf.log file generated during the failed installation?

I don't have that file

Tell us about your system!

What is the output from ruby -v? truffleruby 22.3.0-dev-0e42c2a6, like ruby 3.0.3, GraalVM CE Native [x86_64-linux]

What is the output from gem -v? 3.2.32

What is the output from gem env?

RubyGems Environment:
  - RUBYGEMS VERSION: 3.2.32
  - RUBY VERSION: 3.0.3 (2022-07-23 patchlevel 0) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/mrwormhole/.rbenv/versions/truffleruby-dev/lib/gems
  - USER INSTALLATION DIRECTORY: /home/mrwormhole/.local/share/gem/truffleruby/3.0.3.7
  - RUBY EXECUTABLE: /home/mrwormhole/.rbenv/versions/truffleruby-dev/bin/ruby
  - GIT EXECUTABLE: /usr/bin/git
  - EXECUTABLE DIRECTORY: /home/mrwormhole/.rbenv/versions/truffleruby-dev/bin
  - SPEC CACHE DIRECTORY: /home/mrwormhole/.local/share/gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /home/runner/work/truffleruby-dev-builder/truffleruby-dev-builder/etc
  - RUBYGEMS PLATFORMS:
     - ruby
  - GEM PATHS:
     - /home/mrwormhole/.rbenv/versions/truffleruby-dev/lib/gems
     - /home/mrwormhole/.local/share/gem/truffleruby/3.0.3.7
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--no-document"
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /home/mrwormhole/.rbenv/versions/truffleruby-dev/bin
     - /home/mrwormhole/.rbenv/libexec
     - /home/mrwormhole/.rbenv/plugins/ruby-build/bin
     - /home/mrwormhole/.rbenv/plugins/rbenv-vars/bin
     - /home/mrwormhole/.rbenv/shims
     - /usr/local/bin
     - /usr/local/sbin
     - /usr/bin
     - /usr/sbin
     - /home/mrwormhole/.local/share/JetBrains/Toolbox/scripts
     - /usr/local/go/bin
     - /home/mrwormhole/go/bin
     - /home/mrwormhole/.arkade/bin/
     - /home/mrwormhole/.cargo/bin
     - /home/mrwormhole/.rbenv/bin
     - /home/mrwormhole/.rbenv/plugins/ruby-build/bin

If you're using Bundler:

Bundler version 2.3.18 (2022-07-14 commit fc31b7f7d9)

Don't have that, says Settings are listed in order of priority. The top value will be used.

If Linux or a BSD variant, please note:

flavorjones commented 2 years ago

:wave: Sorry you're having trouble, I'll try to help.

I think you may be having path problems. Your runtime error displays this path:

/home/mrwormhole/.rbenv/versions/truffleruby-dev/lib/gems/gems/nokogiri-1.13.8-x86_64-linux

but the output of nokogiri -v shows this path:

/home/mrwormhole/.rbenv/versions/truffleruby-dev/lib/gems/gems/nokogiri-1.13.8

It looks like you have two different versions of Nokogiri installed -- one (nokogiri-1.13.8-x86_64-linux) is a native precompiled gem suitably only for MRI. That's why you're getting an error.

When you run nokogiri -v, though, everything looks OK. This version looks like it was compiled for truffleruby from source.

Try uninstalling the native version of Nokogiri?

flavorjones commented 2 years ago

You may also want to try to isolate whether this problem is with Nokogiri installation (can you run gem install nokogiri and then run nokogiri -v?) as separate from "how does Rails determine its gem paths during boot or init time?" (You notably didn't include the command you were running in the first part of the post above, that would also help me understand what you're seeing.)

flavorjones commented 2 years ago

I just verified that the following is working OK for me with a clean installation of truffleruby (via ruby-build):

$ ruby -v
truffleruby 22.3.0-dev-3dfcaa03, like ruby 3.0.3, GraalVM CE Native [x86_64-linux]

$ gem install nokogiri
Fetching mini_portile2-2.8.0.gem
Fetching nokogiri-1.13.8.gem
Successfully installed mini_portile2-2.8.0
Building native extensions with: '--disable-static'
This could take a while...
Successfully installed nokogiri-1.13.8
2 gems installed

$ nokogiri -v
# Nokogiri (1.13.8)
    ---
    warnings: []
    nokogiri:
      version: 1.13.8
      cppflags:
      - "-I/home/flavorjones/.rbenv/versions/truffleruby+graalvm-dev/graalvm/languages/ruby/lib/gems/gems/nokogiri-1.13.8/ext/nokogiri"
      - "-I/home/flavorjones/.rbenv/versions/truffleruby+graalvm-dev/graalvm/languages/ruby/lib/gems/gems/nokogiri-1.13.8/ext/nokogiri/include"
      - "-I/home/flavorjones/.rbenv/versions/truffleruby+graalvm-dev/graalvm/languages/ruby/lib/gems/gems/nokogiri-1.13.8/ext/nokogiri/include/libxml2"
      ldflags: []
    ruby:
      version: 3.0.3
      platform: x86_64-linux
      gem_platform: x86_64-linux
      description: truffleruby 22.3.0-dev-3dfcaa03, like ruby 3.0.3, GraalVM CE Native
        [x86_64-linux]
      engine: truffleruby
    libxml:
      source: packaged
      precompiled: false
      patches:
      - 0001-Remove-script-macro-support.patch
      - 0002-Update-entities-to-remove-handling-of-ssi.patch
      - 0003-libxml2.la-is-in-top_builddir.patch
      - 0004-use-glibc-strlen.patch
      - 0005-avoid-isnan-isinf.patch
      - 0006-update-automake-files-for-arm64.patch
      - '0008-htmlParseComment-handle-abruptly-closed-comments.patch'
      - '0009-allow-wildcard-namespaces.patch'
      libxml2_path: "/home/flavorjones/.rbenv/versions/truffleruby+graalvm-dev/graalvm/languages/ruby/lib/gems/gems/nokogiri-1.13.8/ext/nokogiri"
      memory_management: ruby
      iconv_enabled: true
      compiled: 2.9.14
      loaded: 2.9.14
    libxslt:
      source: packaged
      precompiled: false
      patches:
      - 0001-update-automake-files-for-arm64.patch
      datetime_enabled: true
      compiled: 1.1.35
      loaded: 1.1.35
    other_libraries:
      libgumbo: 1.0.0-nokogiri

That is:

What are you doing differently than me?

mrwormhole commented 2 years ago

when I actually do gem install nokogiri it doesn't install when I am on truffle ruby with rbenv It doesn't do any output as well

I do nokogiri -v it says

rbenv: nokogiri: command not found

The `nokogiri' command exists in these Ruby versions:
  3.1.2
mrwormhole commented 2 years ago

I have uninstalled the precompiled binary successfully before I do gem install above

gem uninstall nokogiri                                                            ✔  22:55:11  

Select gem to uninstall:
 1. nokogiri-1.13.8
 2. nokogiri-1.13.8-x86_64-linux
 3. All versions
> 2
Remove executables:
    nokogiri

in addition to the gem? [Yn]  y
Removing nokogiri
Successfully uninstalled nokogiri-1.13.8-x86_64-linux

image

flavorjones commented 2 years ago

Help me help you. I've told you a lot about my system, how I installed ruby, how I installed nokogiri, showed you all my output. What's different about your system that could be causing this problem?

mrwormhole commented 2 years ago

There is something weird, that I don't know why it is not installing to truffle ruby bin

image

I think rails needs precompiled binary, it installs nokogiri gem as precompiled

rails new yolo_app --trace                                                                                                    ✔  23:11:05  
      create  
      create  README.md
      create  Rakefile
      create  .ruby-version
      create  config.ru
      create  .gitignore
      create  .gitattributes
      create  Gemfile
         run  git init from "."
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint:   git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint:   git branch -m <name>
Initialized empty Git repository in /home/mrwormhole/Desktop/Hobby/Rails/yolo_app/.git/
      create  app
      create  app/assets/config/manifest.js
      create  app/assets/stylesheets/application.css
      create  app/channels/application_cable/channel.rb
      create  app/channels/application_cable/connection.rb
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  app/jobs/application_job.rb
      create  app/mailers/application_mailer.rb
      create  app/models/application_record.rb
      create  app/views/layouts/application.html.erb
      create  app/views/layouts/mailer.html.erb
      create  app/views/layouts/mailer.text.erb
      create  app/assets/images
      create  app/assets/images/.keep
      create  app/controllers/concerns/.keep
      create  app/models/concerns/.keep
      create  bin
      create  bin/rails
      create  bin/rake
      create  bin/setup
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/cable.yml
      create  config/puma.rb
      create  config/storage.yml
      create  config/environments
      create  config/environments/development.rb
      create  config/environments/production.rb
      create  config/environments/test.rb
      create  config/initializers
      create  config/initializers/assets.rb
      create  config/initializers/content_security_policy.rb
      create  config/initializers/cors.rb
      create  config/initializers/filter_parameter_logging.rb
      create  config/initializers/inflections.rb
      create  config/initializers/new_framework_defaults_7_0.rb
      create  config/initializers/permissions_policy.rb
      create  config/locales
      create  config/locales/en.yml
      create  config/master.key
      append  .gitignore
      create  config/boot.rb
      create  config/database.yml
      create  db
      create  db/seeds.rb
      create  lib
      create  lib/tasks
      create  lib/tasks/.keep
      create  lib/assets
      create  lib/assets/.keep
      create  log
      create  log/.keep
      create  public
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/apple-touch-icon-precomposed.png
      create  public/apple-touch-icon.png
      create  public/favicon.ico
      create  public/robots.txt
      create  tmp
      create  tmp/.keep
      create  tmp/pids
      create  tmp/pids/.keep
      create  tmp/cache
      create  tmp/cache/assets
      create  vendor
      create  vendor/.keep
      create  test/fixtures/files
      create  test/fixtures/files/.keep
      create  test/controllers
      create  test/controllers/.keep
      create  test/mailers
      create  test/mailers/.keep
      create  test/models
      create  test/models/.keep
      create  test/helpers
      create  test/helpers/.keep
      create  test/integration
      create  test/integration/.keep
      create  test/channels/application_cable/connection_test.rb
      create  test/test_helper.rb
      create  test/system
      create  test/system/.keep
      create  test/application_system_test_case.rb
      create  storage
      create  storage/.keep
      create  tmp/storage
      create  tmp/storage/.keep
      remove  config/initializers/cors.rb
      remove  config/initializers/new_framework_defaults_7_0.rb
         run  bundle install
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...............................
Using rake 13.0.6
Using crass 1.0.6
Using builder 3.2.4
Using mini_portile2 2.8.0
Using racc 1.6.0
Using rack 2.2.4
Using nio4r 2.5.8
Using erubi 1.10.0
Using concurrent-ruby 1.1.10
Using websocket-extensions 0.1.5
Using minitest 5.16.2
Using mini_mime 1.1.2
Using timeout 0.3.0
Using digest 3.1.0
Using marcel 1.0.2
Using strscan 3.0.4
Using public_suffix 4.0.7
Using bindex 0.8.1
Using msgpack 1.5.3
Using matrix 0.4.2
Using regexp_parser 2.5.0
Using bundler 2.3.18
Using childprocess 4.1.0
Using thor 1.2.1
Using method_source 1.0.0
Using zeitwerk 2.6.0
Using puma 5.6.4
Using rexml 3.2.5
Using rubyzip 2.3.2
Using websocket 1.2.9
Using sprockets 4.1.1
Using sqlite3 1.4.4
Using i18n 1.12.0
Using tzinfo 2.0.5
Using rack-test 2.0.2
Using websocket-driver 0.7.5
Using net-protocol 0.1.3
Using mail 2.7.1
Using bootsnap 1.12.0
Using addressable 2.8.0
Using selenium-webdriver 4.3.0
Using activesupport 7.0.3.1
Using net-pop 0.1.1
Using net-imap 0.2.3
Using net-smtp 0.3.1
Using globalid 1.0.0
Using activemodel 7.0.3.1
Using activejob 7.0.3.1
Using activerecord 7.0.3.1
Fetching nokogiri 1.13.8 (x86_64-linux)
Installing nokogiri 1.13.8 (x86_64-linux)
Using xpath 3.2.0
Using rails-dom-testing 2.0.3
Using loofah 2.18.0
Using webdrivers 5.0.0
Using rails-html-sanitizer 1.4.3
Using capybara 3.37.1
Using actionview 7.0.3.1
Using jbuilder 2.11.5
Using actionpack 7.0.3.1
Using actionmailer 7.0.3.1
Using railties 7.0.3.1
Using sprockets-rails 3.4.2
Using activestorage 7.0.3.1
Using actioncable 7.0.3.1
Using web-console 4.2.0
Using importmap-rails 1.1.5
Using stimulus-rails 1.1.0
Using turbo-rails 1.1.1
Using actiontext 7.0.3.1
Using actionmailbox 7.0.3.1
Using rails 7.0.3.1
Bundle complete! 14 Gemfile dependencies, 71 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
         run  bundle binstubs bundler
       rails  importmap:install
rails aborted!
/home/mrwormhole/.rbenv/versions/truffleruby-dev/lib/gems/gems/nokogiri-1.13.8-x86_64-linux/lib/nokogiri/3.0/nokogiri.so: undefined symbol: rb_eTypeError
<internal:core> core/kernel.rb:293:in `require_relative'
<internal:core> core/kernel.rb:293:in `require_relative'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
/home/mrwormhole/Desktop/Hobby/Rails/yolo_app/config/application.rb:3:in `<top (required)>'
<internal:core> core/kernel.rb:293:in `require_relative'
/home/mrwormhole/Desktop/Hobby/Rails/yolo_app/Rakefile:4:in `<top (required)>'
<internal:core> core/kernel.rb:376:in `load'
<internal:core> core/kernel.rb:376:in `load'
<internal:core> core/kernel.rb:234:in `gem_original_require'
bin/rails:4:in `<main>'
(See full trace by running task with --trace)
       rails  turbo:install stimulus:install
rails aborted!
/home/mrwormhole/.rbenv/versions/truffleruby-dev/lib/gems/gems/nokogiri-1.13.8-x86_64-linux/lib/nokogiri/3.0/nokogiri.so: undefined symbol: rb_eTypeError
<internal:core> core/kernel.rb:293:in `require_relative'
<internal:core> core/kernel.rb:293:in `require_relative'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
/home/mrwormhole/Desktop/Hobby/Rails/yolo_app/config/application.rb:3:in `<top (required)>'
<internal:core> core/kernel.rb:293:in `require_relative'
/home/mrwormhole/Desktop/Hobby/Rails/yolo_app/Rakefile:4:in `<top (required)>'
<internal:core> core/kernel.rb:376:in `load'
<internal:core> core/kernel.rb:376:in `load'
<internal:core> core/kernel.rb:234:in `gem_original_require'
bin/rails:4:in `<main>'
(See full trace by running task with --trace)
mrwormhole commented 2 years ago

I think I figured out the issue, I think the problem is being caused by truffle ruby standalone version. Will just confirm by uninstalling mine and reinstalling it

https://www.diffchecker.com/7G4goF3c

welp, I think this is something about rails, it actually installed it now but still fails with the same error message image

    ~/Desktop/Hobby/Rails  rails new yolo_app --trace                                                                                            ✔  18s   23:29:31  
      create  
      create  README.md
      create  Rakefile
      create  .ruby-version
      create  config.ru
      create  .gitignore
      create  .gitattributes
      create  Gemfile
         run  git init from "."
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint:   git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint:   git branch -m <name>
Initialized empty Git repository in /home/mrwormhole/Desktop/Hobby/Rails/yolo_app/.git/
      create  app
      create  app/assets/config/manifest.js
      create  app/assets/stylesheets/application.css
      create  app/channels/application_cable/channel.rb
      create  app/channels/application_cable/connection.rb
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  app/jobs/application_job.rb
      create  app/mailers/application_mailer.rb
      create  app/models/application_record.rb
      create  app/views/layouts/application.html.erb
      create  app/views/layouts/mailer.html.erb
      create  app/views/layouts/mailer.text.erb
      create  app/assets/images
      create  app/assets/images/.keep
      create  app/controllers/concerns/.keep
      create  app/models/concerns/.keep
      create  bin
      create  bin/rails
      create  bin/rake
      create  bin/setup
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/cable.yml
      create  config/puma.rb
      create  config/storage.yml
      create  config/environments
      create  config/environments/development.rb
      create  config/environments/production.rb
      create  config/environments/test.rb
      create  config/initializers
      create  config/initializers/assets.rb
      create  config/initializers/content_security_policy.rb
      create  config/initializers/cors.rb
      create  config/initializers/filter_parameter_logging.rb
      create  config/initializers/inflections.rb
      create  config/initializers/new_framework_defaults_7_0.rb
      create  config/initializers/permissions_policy.rb
      create  config/locales
      create  config/locales/en.yml
      create  config/master.key
      append  .gitignore
      create  config/boot.rb
      create  config/database.yml
      create  db
      create  db/seeds.rb
      create  lib
      create  lib/tasks
      create  lib/tasks/.keep
      create  lib/assets
      create  lib/assets/.keep
      create  log
      create  log/.keep
      create  public
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/apple-touch-icon-precomposed.png
      create  public/apple-touch-icon.png
      create  public/favicon.ico
      create  public/robots.txt
      create  tmp
      create  tmp/.keep
      create  tmp/pids
      create  tmp/pids/.keep
      create  tmp/cache
      create  tmp/cache/assets
      create  vendor
      create  vendor/.keep
      create  test/fixtures/files
      create  test/fixtures/files/.keep
      create  test/controllers
      create  test/controllers/.keep
      create  test/mailers
      create  test/mailers/.keep
      create  test/models
      create  test/models/.keep
      create  test/helpers
      create  test/helpers/.keep
      create  test/integration
      create  test/integration/.keep
      create  test/channels/application_cable/connection_test.rb
      create  test/test_helper.rb
      create  test/system
      create  test/system/.keep
      create  test/application_system_test_case.rb
      create  storage
      create  storage/.keep
      create  tmp/storage
      create  tmp/storage/.keep
      remove  config/initializers/cors.rb
      remove  config/initializers/new_framework_defaults_7_0.rb
         run  bundle install
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...............................
Fetching rake 13.0.6
Installing rake 13.0.6
Using rack 2.2.4
Using concurrent-ruby 1.1.10
Using nio4r 2.5.8
Using websocket-extensions 0.1.5
Using builder 3.2.4
Using mini_portile2 2.8.0
Using erubi 1.10.0
Using marcel 1.0.2
Using mini_mime 1.1.2
Using crass 1.0.6
Fetching racc 1.6.0
Fetching minitest 5.16.2
Fetching timeout 0.3.0
Fetching digest 3.1.0
Using bundler 2.3.18
Fetching strscan 3.0.4
Fetching matrix 0.4.2
Using method_source 1.0.0
Fetching bindex 0.8.1
Using thor 1.2.1
Fetching public_suffix 4.0.7
Using zeitwerk 2.6.0
Using rexml 3.2.5
Fetching rubyzip 2.3.2
Fetching websocket 1.2.9
Fetching childprocess 4.1.0
Fetching regexp_parser 2.5.0
Fetching sqlite3 1.4.4
Fetching sprockets 4.1.1
Fetching msgpack 1.5.3
Fetching puma 5.6.4
Installing timeout 0.3.0
Installing strscan 3.0.4 with native extensions
Installing matrix 0.4.2
Using i18n 1.12.0
Using tzinfo 2.0.5
Using rack-test 2.0.2
Using websocket-driver 0.7.5
Using mail 2.7.1
Fetching net-protocol 0.1.3
Installing digest 3.1.0 with native extensions
Installing racc 1.6.0 with native extensions
Installing websocket 1.2.9
Installing bindex 0.8.1 with native extensions
Installing regexp_parser 2.5.0
Installing childprocess 4.1.0
Installing public_suffix 4.0.7
Installing minitest 5.16.2
Installing rubyzip 2.3.2
Installing net-protocol 0.1.3
Fetching addressable 2.8.0
Using activesupport 7.0.3.1
Using activemodel 7.0.3.1
Using globalid 1.0.0
Using activerecord 7.0.3.1
Using activejob 7.0.3.1
Fetching selenium-webdriver 4.3.0
Installing puma 5.6.4 with native extensions
Fetching nokogiri 1.13.8 (x86_64-linux)
Installing msgpack 1.5.3 with native extensions
Installing sqlite3 1.4.4 with native extensions
Installing sprockets 4.1.1
Installing addressable 2.8.0
Installing selenium-webdriver 4.3.0
Installing nokogiri 1.13.8 (x86_64-linux)
Using net-pop 0.1.1
Fetching net-smtp 0.3.1
Fetching net-imap 0.2.3
Using rails-dom-testing 2.0.3
Using loofah 2.18.0
Using rails-html-sanitizer 1.4.3
Fetching xpath 3.2.0
Fetching webdrivers 5.0.0
Using actionview 7.0.3.1
Using actionpack 7.0.3.1
Using railties 7.0.3.1
Using actioncable 7.0.3.1
Fetching sprockets-rails 3.4.2
Using activestorage 7.0.3.1
Fetching jbuilder 2.11.5
Fetching web-console 4.2.0
Fetching importmap-rails 1.1.5
Fetching stimulus-rails 1.1.0
Using actiontext 7.0.3.1
Fetching turbo-rails 1.1.1
Fetching bootsnap 1.12.0
Installing net-imap 0.2.3
Installing net-smtp 0.3.1
Using actionmailer 7.0.3.1
Using actionmailbox 7.0.3.1
Using rails 7.0.3.1
Installing jbuilder 2.11.5
Installing stimulus-rails 1.1.0
Installing web-console 4.2.0
Installing xpath 3.2.0
Fetching capybara 3.37.1
Installing importmap-rails 1.1.5
Installing sprockets-rails 3.4.2
Installing bootsnap 1.12.0 with native extensions
Installing turbo-rails 1.1.1
Installing webdrivers 5.0.0
Installing capybara 3.37.1
Bundle complete! 14 Gemfile dependencies, 71 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
         run  bundle binstubs bundler
       rails  importmap:install
rails aborted!
/home/mrwormhole/.rbenv/versions/truffleruby+graalvm-dev/graalvm/languages/ruby/lib/gems/gems/nokogiri-1.13.8-x86_64-linux/lib/nokogiri/3.0/nokogiri.so: undefined symbol: rb_eTypeError
<internal:core> core/kernel.rb:293:in `require_relative'
<internal:core> core/kernel.rb:293:in `require_relative'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
/home/mrwormhole/Desktop/Hobby/Rails/yolo_app/config/application.rb:3:in `<top (required)>'
<internal:core> core/kernel.rb:293:in `require_relative'
/home/mrwormhole/Desktop/Hobby/Rails/yolo_app/Rakefile:4:in `<top (required)>'
<internal:core> core/kernel.rb:376:in `load'
<internal:core> core/kernel.rb:376:in `load'
<internal:core> core/kernel.rb:234:in `gem_original_require'
bin/rails:4:in `<main>'
(See full trace by running task with --trace)
       rails  turbo:install stimulus:install
rails aborted!
/home/mrwormhole/.rbenv/versions/truffleruby+graalvm-dev/graalvm/languages/ruby/lib/gems/gems/nokogiri-1.13.8-x86_64-linux/lib/nokogiri/3.0/nokogiri.so: undefined symbol: rb_eTypeError
<internal:core> core/kernel.rb:293:in `require_relative'
<internal:core> core/kernel.rb:293:in `require_relative'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
<internal:core> core/kernel.rb:234:in `gem_original_require'
/home/mrwormhole/Desktop/Hobby/Rails/yolo_app/config/application.rb:3:in `<top (required)>'
<internal:core> core/kernel.rb:293:in `require_relative'
/home/mrwormhole/Desktop/Hobby/Rails/yolo_app/Rakefile:4:in `<top (required)>'
<internal:core> core/kernel.rb:376:in `load'
<internal:core> core/kernel.rb:376:in `load'
<internal:core> core/kernel.rb:234:in `gem_original_require'
bin/rails:4:in `<main>'
(See full trace by running task with --trace)

Looks like a big issue with bundler version 2.3.18 and 2.3.17 https://github.com/rubygems/rubygems/issues/5691 can be closed now, I will be waiting for bundler updates, thanks for the help @flavorjones

flavorjones commented 2 years ago

Ah, yes, https://github.com/rubygems/rubygems/issues/5691 looks like what you're seeing when use bundler.

If you're on Bundler 2.3.18 you may want to try the new force_ruby_platform: true option in the Gemfile for Nokogiri.

mrwormhole commented 2 years ago

just for the clarity of my final result and for the records, installing bundler -v 2.3.16 fixed it, cheers, it was a bigger issue but related to a different gem, bundler 2.3.17 and 2.3.18 breaks. Cheers man, thanks.