ローカル環境でrails sしたいのにできない。どうしたら良いですか？


`rails s` でサーバーを立ち上げたいです。 ローカル環境にて`rails s`をしたら以下のエラーが出て

[code]

    /.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/resolver.rb:233:in `search_for': Unable to resolve dependency: user requested 'executable-hooks (= 1.6.1)' (Gem::UnsatisfiableDependencyError)         from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/resolver.rb:288:in `block in sort_dependencies'
    
    from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/resolver.rb:282:in each'         from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/resolver.rb:282:in sort_by' from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/resolver.rb:282:in with_index'         from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/resolver.rb:282:in sort_dependencies' from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb:60:in block in sort_dependencies'         from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb:77:in with_no_such_dependency_error_handling' from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb:59:in sort_dependencies'         from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:754:in push_state_for_requirements' from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:288:in push_initial_state'         from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:210:in start_resolution' from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:168:in resolve'         from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/resolver/molinillo/lib/molinillo/resolver.rb:43:in resolve' from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/resolver.rb:190:in resolve'         from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/request_set.rb:411:in resolve' from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/request_set.rb:423:in resolve_current'         from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems.rb:230:in finish_resolve' from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems.rb:287:in block in activate_bin_path'         from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems.rb:285:in synchronize' from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems.rb:285:in activate_bin_path'         from /home/ec2-user/.rvm/gems/ruby-3.1.2/bin/rails:25:in <main>' from /home/ec2-user/.rvm/gems/ruby-3.1.2/bin/ruby_executable_hooks:22:in eval'         from       /home/ec2-user/.rvm/gems/ruby-3.1.2/bin/ruby_executable_hooks:22:in <main>'.
    
[/code]

### 試したこと

gemファイルのsqlのバージョンを更新の記述をして `bundle install` したところ An error occurred while
installing mysql2 (0.5.5), and Bundler cannot continue. gem
lockファイルを一旦削除して`bundle install`してAWS再起動、変わらなかったので復活させました。

PCはmac M1を使っていて、AWSを使ってプログラミングをしています。

読みずらいところがあるかもしれませんが 同じエラーが出たことがある方アドバイスお願いします。

Gemfile

[code]

        ruby '3.1.2'
    
    gem 'rails', '~> 6.1.7', '>= 6.1.7.4'
    
    gem 'sqlite3', '~> 1.4'
    
    gem 'puma', '~> 3.11'
    
    gem 'sass-rails', '>= 6'
    
    gem 'webpacker', '~> 5.0'
    
    gem 'jbuilder', '~> 2.7'
    
    gem 'bootsnap', '>= 1.4.4', require: false.  
    
        group :development, :test do
      
      gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
    end.  
    
        group :development do
     
      gem 'web-console', '>= 4.1.0'
      
      gem 'rack-mini-profiler', '~> 2.0'
      gem 'listen', '~> 3.3'
      
      gem 'spring'
    end.   
    
        group :test do
      
      gem 'capybara', '>= 3.26'
      gem 'selenium-webdriver', '>= 4.0.0.rc1'
      gem 'webdrivers'
    end.  
    
        gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
    
    gem 'devise'
    
    gem 'image_processing', '~> 1.2'
    
    gem 'kaminari','~> 1.2.1'
    
    gem 'jquery-rails'.  
    
       gem 'dotenv-rails'
    group :production do
      gem 'mysql2' , '~> 0.5.5'
    end.  
    
       gem 'active_storage_validations'
    
    gem 'rails-i18n'
    
    gem 'bootstrap4-kaminari-views'
    
    gem "net-smtp"
    gem "net-pop"
    gem "net-imap"
    
    gem 'shared-mime-info', '~> 0.2.5'.   
    
[/code]

Gemlockfile

[code]

    GEM
      remote: https://rubygems.org/
      specs:
        actioncable (6.1.7.4)
          actionpack (= 6.1.7.4)
          activesupport (= 6.1.7.4)
          nio4r (~> 2.0)
          websocket-driver (>= 0.6.1)
        actionmailbox (6.1.7.4)
          actionpack (= 6.1.7.4)
          activejob (= 6.1.7.4)
          activerecord (= 6.1.7.4)
          activestorage (= 6.1.7.4)
          activesupport (= 6.1.7.4)
          mail (>= 2.7.1)
        actionmailer (6.1.7.4)
          actionpack (= 6.1.7.4)
          actionview (= 6.1.7.4)
          activejob (= 6.1.7.4)
          activesupport (= 6.1.7.4)
          mail (~> 2.5, >= 2.5.4)
          rails-dom-testing (~> 2.0)
        actionpack (6.1.7.4)
          actionview (= 6.1.7.4)
          activesupport (= 6.1.7.4)
          rack (~> 2.0, >= 2.0.9)
          rack-test (>= 0.6.3)
          rails-dom-testing (~> 2.0)
          rails-html-sanitizer (~> 1.0, >= 1.2.0)
        actiontext (6.1.7.4)
          actionpack (= 6.1.7.4)
          activerecord (= 6.1.7.4)
          activestorage (= 6.1.7.4)
          activesupport (= 6.1.7.4)
          nokogiri (>= 1.8.5)
        actionview (6.1.7.4)
          activesupport (= 6.1.7.4)
          builder (~> 3.1)
          erubi (~> 1.4)
          rails-dom-testing (~> 2.0)
          rails-html-sanitizer (~> 1.1, >= 1.2.0)
        active_storage_validations (1.0.4)
          activejob (>= 5.2.0)
          activemodel (>= 5.2.0)
          activestorage (>= 5.2.0)
          activesupport (>= 5.2.0)
        activejob (6.1.7.4)
          activesupport (= 6.1.7.4)
          globalid (>= 0.3.6)
        activemodel (6.1.7.4)
          activesupport (= 6.1.7.4)
        activerecord (6.1.7.4)
          activemodel (= 6.1.7.4)
          activesupport (= 6.1.7.4)
        activestorage (6.1.7.4)
          actionpack (= 6.1.7.4)
          activejob (= 6.1.7.4)
          activerecord (= 6.1.7.4)
          activesupport (= 6.1.7.4)
          marcel (~> 1.0)
          mini_mime (>= 1.1.0)
        activesupport (6.1.7.4)
          concurrent-ruby (~> 1.0, >= 1.0.2)
          i18n (>= 1.6, < 2)
          minitest (>= 5.1)
          tzinfo (~> 2.0)
          zeitwerk (~> 2.3)
        addressable (2.8.4)
          public_suffix (>= 2.0.2, < 6.0)
        bcrypt (3.1.19)
        bindex (0.8.1)
        bootsnap (1.16.0)
          msgpack (~> 1.2)
        bootstrap4-kaminari-views (1.0.1)
          kaminari (>= 0.13)
          rails (>= 3.1)
        builder (3.2.4)
        byebug (11.1.3)
        capybara (3.39.2)
          addressable
          matrix
          mini_mime (>= 0.1.3)
          nokogiri (~> 1.8)
          rack (>= 1.6.0)
          rack-test (>= 0.6.3)
          regexp_parser (>= 1.5, < 3.0)
          xpath (~> 3.2)
        concurrent-ruby (1.2.2)
        crass (1.0.6)
        date (3.3.3)
        devise (4.9.2)
          bcrypt (~> 3.0)
          orm_adapter (~> 0.1)
          railties (>= 4.1.0)
          responders
          warden (~> 1.2.3)
        dotenv (2.8.1)
        dotenv-rails (2.8.1)
          dotenv (= 2.8.1)
          railties (>= 3.2)
        erubi (1.12.0)
        ffi (1.15.5)
        globalid (1.1.0)
          activesupport (>= 5.0)
        i18n (1.14.1)
          concurrent-ruby (~> 1.0)
        image_processing (1.12.2)
          mini_magick (>= 4.9.5, < 5)
          ruby-vips (>= 2.0.17, < 3)
        jbuilder (2.11.5)
          actionview (>= 5.0.0)
          activesupport (>= 5.0.0)
        jquery-rails (4.6.0)
          rails-dom-testing (>= 1, < 3)
          railties (>= 4.2.0)
          thor (>= 0.14, < 2.0)
        kaminari (1.2.2)
          activesupport (>= 4.1.0)
          kaminari-actionview (= 1.2.2)
          kaminari-activerecord (= 1.2.2)
          kaminari-core (= 1.2.2)
        kaminari-actionview (1.2.2)
          actionview
          kaminari-core (= 1.2.2)
        kaminari-activerecord (1.2.2)
          activerecord
          kaminari-core (= 1.2.2)
        kaminari-core (1.2.2)
        listen (3.8.0)
          rb-fsevent (~> 0.10, >= 0.10.3)
          rb-inotify (~> 0.9, >= 0.9.10)
        loofah (2.21.3)
          crass (~> 1.0.2)
          nokogiri (>= 1.12.0)
        mail (2.8.1)
          mini_mime (>= 0.1.1)
          net-imap
          net-pop
          net-smtp
        marcel (1.0.2)
        matrix (0.4.2)
        method_source (1.0.0)
        mini_magick (4.12.0)
        mini_mime (1.1.2)
        minitest (5.18.1)
        msgpack (1.7.2)
        mysql2 (0.5.5)
        net-imap (0.3.6)
          date
          net-protocol
        net-pop (0.1.2)
          net-protocol
        net-protocol (0.2.1)
          timeout
        net-smtp (0.3.3)
          net-protocol
        nio4r (2.5.9)
        nokogiri (1.15.3-x86_64-linux)
          racc (~> 1.4)
        orm_adapter (0.5.0)
        public_suffix (5.0.3)
        puma (3.12.6)
        racc (1.7.1)
        rack (2.2.7)
        rack-mini-profiler (2.3.4)
          rack (>= 1.2.0)
        rack-proxy (0.7.6)
          rack
        rack-test (2.1.0)
          rack (>= 1.3)
        rails (6.1.7.4)
          actioncable (= 6.1.7.4)
          actionmailbox (= 6.1.7.4)
          actionmailer (= 6.1.7.4)
          actionpack (= 6.1.7.4)
          actiontext (= 6.1.7.4)
          actionview (= 6.1.7.4)
          activejob (= 6.1.7.4)
          activemodel (= 6.1.7.4)
          activerecord (= 6.1.7.4)
          activestorage (= 6.1.7.4)
          activesupport (= 6.1.7.4)
          bundler (>= 1.15.0)
          railties (= 6.1.7.4)
          sprockets-rails (>= 2.0.0)
        rails-dom-testing (2.1.1)
          activesupport (>= 5.0.0)
          minitest
          nokogiri (>= 1.6)
        rails-html-sanitizer (1.6.0)
          loofah (~> 2.21)
          nokogiri (~> 1.14)
        rails-i18n (7.0.7)
          i18n (>= 0.7, < 2)
          railties (>= 6.0.0, < 8)
        railties (6.1.7.4)
          actionpack (= 6.1.7.4)
          activesupport (= 6.1.7.4)
          method_source
          rake (>= 12.2)
          thor (~> 1.0)
        rake (13.0.6)
        rb-fsevent (0.11.2)
        rb-inotify (0.10.1)
          ffi (~> 1.0)
        regexp_parser (2.8.1)
        responders (3.1.0)
          actionpack (>= 5.2)
          railties (>= 5.2)
        rexml (3.2.5)
        ruby-vips (2.1.4)
          ffi (~> 1.12)
        rubyzip (2.3.2)
        sass-rails (6.0.0)
          sassc-rails (~> 2.1, >= 2.1.1)
        sassc (2.4.0)
          ffi (~> 1.9)
        sassc-rails (2.1.2)
          railties (>= 4.0.0)
          sassc (>= 2.0)
          sprockets (> 3.0)
          sprockets-rails
          tilt
    
        selenium-webdriver (4.10.0)
          rexml (~> 3.2, >= 3.2.5)
          rubyzip (>= 1.2.2, < 3.0)
          websocket (~> 1.0)
        semantic_range (3.0.0)
        spring (4.1.1)
        sprockets (4.2.0)
          concurrent-ruby (~> 1.0)
          rack (>= 2.2.4, < 4)
        sprockets-rails (3.4.2)
          actionpack (>= 5.2)
          activesupport (>= 5.2)
          sprockets (>= 3.0.0)
        sqlite3 (1.6.3-x86_64-linux)
        thor (1.2.2)
        tilt (2.2.0)
        timeout (0.4.0)
        tzinfo (2.0.6)
          concurrent-ruby (~> 1.0)
        warden (1.2.9)
          rack (>= 2.0.9)
        web-console (4.2.0)
          actionview (>= 6.0.0)
          activemodel (>= 6.0.0)
          bindex (>= 0.4.0)
          railties (>= 6.0.0)
        webdrivers (5.2.0)
          nokogiri (~> 1.6)
          rubyzip (>= 1.3.0)
          selenium-webdriver (~> 4.0)
        webpacker (5.4.4)
          activesupport (>= 5.2)
          rack-proxy (>= 0.6.1)
          railties (>= 5.2)
          semantic_range (>= 2.3.0)
        websocket (1.2.9)
        websocket-driver (0.7.5)
          websocket-extensions (>= 0.1.0)
        websocket-extensions (0.1.5)
        xpath (3.2.0)
          nokogiri (~> 1.8)
        zeitwerk (2.6.8)
    
    PLATFORMS
      x86_64-linux
    
    DEPENDENCIES
      active_storage_validations
      bootsnap (>= 1.4.4)
      bootstrap4-kaminari-views
      byebug
      capybara (>= 3.26)
      devise
      dotenv-rails
      image_processing (~> 1.2)
      jbuilder (~> 2.7)
      jquery-rails
      kaminari (~> 1.2.1)
      listen (~> 3.3)
      mysql2
      net-imap
      net-pop
      net-smtp
      puma (~> 3.11)
      rack-mini-profiler (~> 2.0)
      rails (~> 6.1.7, >= 6.1.7.4)
      rails-i18n
      sass-rails (>= 6)
      selenium-webdriver (>= 4.0.0.rc1)
      spring
      sqlite3 (~> 1.4)
      tzinfo-data
      web-console (>= 4.1.0)
      webdrivers
      webpacker (~> 5.0)
    
    RUBY VERSION
       ruby 3.1.2p20
    
    BUNDLED WITH
       2.3.19
    
[/code]

以下 bundle installを実行した結果です。

[code]

    Fetching gem metadata from https://rubygems.org/...........
    Resolving dependencies.........
    Using rake 13.1.0
    Using concurrent-ruby 1.2.2
    Using i18n 1.14.1
    Using minitest 5.20.0
    Using tzinfo 2.0.6
    Using zeitwerk 2.6.12
    Using activesupport 6.1.7.6
    Using builder 3.2.4
    Using erubi 1.12.0
    Using racc 1.7.3
    Fetching nokogiri 1.15.5 (x86_64-linux)
    Installing nokogiri 1.15.5 (x86_64-linux)
    Using rails-dom-testing 2.2.0
    Using crass 1.0.6
    Using loofah 2.22.0
    Using rails-html-sanitizer 1.6.0
    Using actionview 6.1.7.6
    Using rack 2.2.8
    Using rack-test 2.1.0
    Using actionpack 6.1.7.6
    Fetching nio4r 2.6.1
    Installing nio4r 2.6.1 with native extensions
    Using websocket-extensions 0.1.5
    Using websocket-driver 0.7.6
    Using actioncable 6.1.7.6
    Using globalid 1.2.1
    Using activejob 6.1.7.6
    Using activemodel 6.1.7.6
    Using activerecord 6.1.7.6
    Using marcel 1.0.2
    Using mini_mime 1.1.5
    Using activestorage 6.1.7.6
    Using date 3.3.4
    Using timeout 0.4.1
    Using net-protocol 0.2.2
    Fetching net-imap 0.4.7
    Installing net-imap 0.4.7
    Using net-pop 0.1.2
    Using net-smtp 0.4.0
    Using mail 2.8.1
    Using actionmailbox 6.1.7.6
    Using actionmailer 6.1.7.6
    Using actiontext 6.1.7.6
    Fetching active_storage_validations 1.1.3
    Installing active_storage_validations 1.1.3
    Fetching bcrypt 3.1.20
    Installing bcrypt 3.1.20 with native extensions
    Using msgpack 1.7.2
    Using bootsnap 1.17.0
    Using kaminari-core 1.2.2
    Using kaminari-actionview 1.2.2
    Using kaminari-activerecord 1.2.2
    Using kaminari 1.2.2
    Using bundler 2.3.19
    Using method_source 1.0.0
    Using thor 1.3.0
    Using railties 6.1.7.6
    Using sprockets 4.2.1
    Using sprockets-rails 3.4.2
    Using rails 6.1.7.6
    Using bootstrap4-kaminari-views 1.0.1
    Using orm_adapter 0.5.0
    Using responders 3.1.1
    Using warden 1.2.9
    Using devise 4.9.3
    Using dotenv 2.8.1
    Using dotenv-rails 2.8.1
    Using ffi 1.16.3
    Using mini_magick 4.12.0
    Using ruby-vips 2.2.0
    Using image_processing 1.12.2
    Using jbuilder 2.11.5
    Using jquery-rails 4.6.0
    Installing mysql2 0.5.5 with native extensions
    Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
    
    current directory:
    /home/ec2-user/environment/tabimaru_portfolio/vendor/bundle/ruby/3.1.0/gems/mysql2-0.5.5/ext/mysql2
    /home/ec2-user/.rvm/rubies/ruby-3.1.2/bin/ruby -I
    /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0 -r
    ./siteconf20231130-8219-zq4k8m.rb extconf.rb
    checking for rb_absint_size()... yes
    checking for rb_absint_singlebit_p()... yes
    checking for rb_gc_mark_movable()... yes
    checking for rb_wait_for_single_fd()... yes
    checking for rb_enc_interned_str() in ruby.h... yes
    *** extconf.rb failed ***
    Could not create Makefile due to some reason, probably lack of necessary
    libraries and/or headers.  Check the mkmf.log file for more details.  You may
    need configuration options.
    
    Provided configuration options:
            --with-opt-dir
            --without-opt-dir
            --with-opt-include
            --without-opt-include=${opt-dir}/include
            --with-opt-lib
            --without-opt-lib=${opt-dir}/lib
            --with-make-prog
            --without-make-prog
            --srcdir=.
            --curdir
            --ruby=/home/ec2-user/.rvm/rubies/ruby-3.1.2/bin/$(RUBY_BASE_NAME)
            --with-openssl-dir
            --without-openssl-dir
            --with-mysql-dir
            --without-mysql-dir
            --with-mysql-include
            --without-mysql-include=${mysql-dir}/include
            --with-mysql-lib
            --without-mysql-lib=${mysql-dir}/lib
            --with-mysql-config
            --without-mysql-config
            --with-mysqlclient-dir
            --without-mysqlclient-dir
            --with-mysqlclient-include
            --without-mysqlclient-include=${mysqlclient-dir}/include
            --with-mysqlclient-lib
            --without-mysqlclient-lib=${mysqlclient-dir}/lib
            --with-mysqlclientlib
            --without-mysqlclientlib
    /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/mkmf.rb:1086:in `block in
    find_library': undefined method `split' for nil:NilClass (NoMethodError)
    
        paths = paths.flat_map {|path| path.split(File::PATH_SEPARATOR)}
                                           ^^^^^^
    from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/mkmf.rb:1086:in
    `each'
    from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/mkmf.rb:1086:in
    `flat_map'
    from /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/mkmf.rb:1086:in
    `find_library'
            from extconf.rb:131:in `<main>'
    
    To see why this extension failed to compile, please check the mkmf.log which can
    be found here:
    
    /home/ec2-user/environment/tabimaru_portfolio/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/mysql2-0.5.5/mkmf.log
    
    extconf failed, exit code 1
    
    Gem files will remain installed in
    /home/ec2-user/environment/tabimaru_portfolio/vendor/bundle/ruby/3.1.0/gems/mysql2-0.5.5
    for inspection.
    Results logged to
    /home/ec2-user/environment/tabimaru_portfolio/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/mysql2-0.5.5/gem_make.out
    
    /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/ext/builder.rb:95:in
    `run'
    /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:47:in
    `block in build'
      /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/tempfile.rb:317:in `open'
    /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:26:in
    `build'
    /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/ext/builder.rb:161:in
    `build_extension'
    /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/ext/builder.rb:195:in
    `block in build_extensions'
    /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in
    `each'
    /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in
    `build_extensions'
    /home/ec2-user/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/installer.rb:853:in
    `build_extensions'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/rubygems_gem_installer.rb:72:in
    `build_extensions'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/rubygems_gem_installer.rb:28:in
    `install'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/source/rubygems.rb:207:in
    `install'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/installer/gem_installer.rb:54:in
    `install'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/installer/gem_installer.rb:16:in
    `install_from_spec'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/installer/parallel_installer.rb:186:in
    `do_install'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/installer/parallel_installer.rb:171:in
    `install_serially'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/installer/parallel_installer.rb:97:in
    `call'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/installer/parallel_installer.rb:71:in
    `call'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/installer.rb:259:in
    `install_in_parallel'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/installer.rb:209:in
    `install'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/installer.rb:89:in
    `block in run'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/process_lock.rb:12:in
    `block in lock'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/process_lock.rb:9:in
    `open'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/process_lock.rb:9:in
    `lock'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/installer.rb:71:in
    `run'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/installer.rb:23:in
    `install'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/cli/install.rb:62:in
    `run'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/cli.rb:255:in
    `block in install'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/settings.rb:132:in
    `temporary'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/cli.rb:254:in
    `install'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/vendor/thor/lib/thor/command.rb:27:in
    `run'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in
    `invoke_command'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/vendor/thor/lib/thor.rb:392:in
    `dispatch'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/cli.rb:31:in
    `dispatch'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/vendor/thor/lib/thor/base.rb:485:in
    `start'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/cli.rb:25:in
    `start'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/exe/bundle:48:in
    `block in <top (required)>'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/lib/bundler/friendly_errors.rb:120:in
    `with_friendly_errors'
    /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.19/exe/bundle:36:in `<top
    (required)>'
      /home/ec2-user/.rvm/gems/ruby-3.1.2/bin/bundle:25:in `load'
      /home/ec2-user/.rvm/gems/ruby-3.1.2/bin/bundle:25:in `<main>'
    
    An error occurred while installing mysql2 (0.5.5), and Bundler cannot
    continue.
    
    In Gemfile:
      mysql2
    
[/code]

