ruby / setup-ruby

An action to download a prebuilt Ruby and add it to the PATH in 5 seconds
https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
MIT License
802 stars 259 forks source link

Ruby 2.7 LoadError #95

Closed JuanitoFatas closed 4 years ago

JuanitoFatas commented 4 years ago

Sorry I know this is not the right project to open this issue, sorry in advance.

Wonder if you got any pointers on resolving this LoadError for ruby/www.ruby-lang.org from this PR - The PR itself is irrelevant.

The action workflow file.

Full Error ``` Checking markdown files... ok rake aborted! LoadError: dlopen(/Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/ffi-1.11.1/lib/ffi_c.bundle, 9): Library not loaded: /Users/runner/.rubies/ruby-2.7.1/lib/libruby.2.7.dylib Referenced from: /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/ffi-1.11.1/lib/ffi_c.bundle Reason: image not found - /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/ffi-1.11.1/lib/ffi_c.bundle /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/ffi-1.11.1/lib/ffi.rb:6:in `require' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/ffi-1.11.1/lib/ffi.rb:6:in `rescue in ' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/ffi-1.11.1/lib/ffi.rb:3:in `' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/sassc-2.2.1/lib/sassc/native.rb:3:in `require' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/sassc-2.2.1/lib/sassc/native.rb:3:in `' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/sassc-2.2.1/lib/sassc.rb:31:in `require_relative' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/sassc-2.2.1/lib/sassc.rb:31:in `' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/jekyll-sass-converter-2.0.1/lib/jekyll/converters/scss.rb:3:in `require' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/jekyll-sass-converter-2.0.1/lib/jekyll/converters/scss.rb:3:in `' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/jekyll-sass-converter-2.0.1/lib/jekyll-sass-converter.rb:4:in `require' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/jekyll-sass-converter-2.0.1/lib/jekyll-sass-converter.rb:4:in `' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.0/lib/jekyll.rb:206:in `require' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.0/lib/jekyll.rb:206:in `' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/lanyon-0.4.1/lib/lanyon.rb:7:in `require' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/lanyon-0.4.1/lib/lanyon.rb:7:in `' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/Rakefile:21:in `require' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/Rakefile:21:in `block in ' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/rake-13.0.0/exe/rake:27:in `' /Users/runner/.rubies/ruby-2.7.2/bin/bundle:23:in `load' /Users/runner/.rubies/ruby-2.7.2/bin/bundle:23:in `
' Caused by: LoadError: cannot load such file -- 2.7/ffi_c /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/ffi-1.11.1/lib/ffi.rb:4:in `require' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/ffi-1.11.1/lib/ffi.rb:4:in `' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/sassc-2.2.1/lib/sassc/native.rb:3:in `require' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/sassc-2.2.1/lib/sassc/native.rb:3:in `' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/sassc-2.2.1/lib/sassc.rb:31:in `require_relative' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/sassc-2.2.1/lib/sassc.rb:31:in `' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/jekyll-sass-converter-2.0.1/lib/jekyll/converters/scss.rb:3:in `require' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/jekyll-sass-converter-2.0.1/lib/jekyll/converters/scss.rb:3:in `' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/jekyll-sass-converter-2.0.1/lib/jekyll-sass-converter.rb:4:in `require' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/jekyll-sass-converter-2.0.1/lib/jekyll-sass-converter.rb:4:in `' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.0/lib/jekyll.rb:206:in `require' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.0/lib/jekyll.rb:206:in `' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/lanyon-0.4.1/lib/lanyon.rb:7:in `require' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/lanyon-0.4.1/lib/lanyon.rb:7:in `' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/Rakefile:21:in `require' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/Rakefile:21:in `block in ' /Users/runner/work/www.ruby-lang.org/www.ruby-lang.org/vendor/bundle/ruby/2.7.0/gems/rake-13.0.0/exe/rake:27:in `' /Users/runner/.rubies/ruby-2.7.2/bin/bundle:23:in `load' /Users/runner/.rubies/ruby-2.7.2/bin/bundle:23:in `
' Tasks: TOP => test => build (See full trace by running task with --trace) Error: Process completed with exit code 1. ```

It started breaking since October 6.

Cheers.

eregon commented 4 years ago

You are manually caching bundle install, that's tricky to do correctly. Could you try with https://github.com/ruby/setup-ruby#caching-bundle-install-automatically and remove anything related to caching or Bundler in the workflow?

You can also try changing the key for actions/cache@v1 (by appending some random string), to invalidate the cache, and see if this is caused by cached data.

BTW, there is warning, probably harmless but seems worth fixing: https://github.com/ruby/www.ruby-lang.org/runs/1288399116#step:4:1

eregon commented 4 years ago

The $CUSTOM_RUBY_VERSION logic might also cause issues. Why not simply using ruby RUBY_VERSION in the Gemfile?

I don't recall anymore if in Bundler 2 ruby version in the Gemfile has any effect. Maybe it's not necessary anymore?

JuanitoFatas commented 4 years ago

@eregon Thanks Benoit! I have fixed the build based on your recommendation. You are amazing!

https://github.com/ruby/www.ruby-lang.org/pull/2521