endoflife-date / endoflife.date

Informative site with EoL dates of everything
https://endoflife.date
MIT License
2.27k stars 675 forks source link

Bundler install issue - Sass-embedded #5109

Closed baggers27 closed 3 weeks ago

baggers27 commented 1 month ago

I've tried to follow the instructions here https://github.com/endoflife-date/endoflife.date/blob/master/HACKING.md, so I can have a local version of the site and start raising pull requests. However there appears to be an issue with the bundle install step, linked to this: https://github.com/sass-contrib/sass-embedded-host-ruby/issues/176. Is anything needed to be changed on the endoflife.date side to fix this?

marcwrobel commented 1 month ago

@baggers27, can you provide more information on your environment (OS, Ruby version...) and the exact error message you have ?

baggers27 commented 1 month ago

So I've done these commands below on a new VM image as I did manage to get it working yesterday by bashing some keys but I wanted to replicate the issue.

┌──(kali㉿kali)-[~] └─$ ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux-gnu]

┌──(kali㉿kali)-[~] └─$ gem -v
3.4.20

┌──(kali㉿kali)-[~] └─$ uname -a Linux kali 6.6.9-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.6.9-1kali1 (2024-01-08) x86_64 GNU/Linux

┌──(kali㉿kali)-[~] └─$ gem install bundler Fetching bundler-2.5.10.gem ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /var/lib/gems/3.1.0 directory. /usr/lib/ruby/vendor_ruby/rubygems/installer.rb:713:in verify_gem_home' /usr/lib/ruby/vendor_ruby/rubygems/installer.rb:903:inpre_install_checks' /usr/lib/ruby/vendor_ruby/rubygems/installer.rb:303:in install' /usr/lib/ruby/vendor_ruby/rubygems/resolver/specification.rb:105:ininstall' /usr/lib/ruby/vendor_ruby/rubygems/request_set.rb:195:in block in install' /usr/lib/ruby/vendor_ruby/rubygems/request_set.rb:183:ineach' /usr/lib/ruby/vendor_ruby/rubygems/request_set.rb:183:in install' /usr/lib/ruby/vendor_ruby/rubygems/commands/install_command.rb:215:ininstall_gem' /usr/lib/ruby/vendor_ruby/rubygems/commands/install_command.rb:231:in block in install_gems' /usr/lib/ruby/vendor_ruby/rubygems/commands/install_command.rb:224:ineach' /usr/lib/ruby/vendor_ruby/rubygems/commands/install_command.rb:224:in install_gems' /usr/lib/ruby/vendor_ruby/rubygems/commands/install_command.rb:170:inexecute' /usr/lib/ruby/vendor_ruby/rubygems/command.rb:328:in invoke_with_build_args' /usr/lib/ruby/vendor_ruby/rubygems/command_manager.rb:253:ininvoke_command' /usr/lib/ruby/vendor_ruby/rubygems/command_manager.rb:193:in process_args' /usr/lib/ruby/vendor_ruby/rubygems/command_manager.rb:151:inrun' /usr/lib/ruby/vendor_ruby/rubygems/gem_runner.rb:52:in run' /usr/bin/gem:12:in

'

As the kali user, You don't have write permissions for the /var/lib/gems/3.1.0 directory. So I did sudo gem install bundler.

┌──(kali㉿kali)-[~] └─$ sudo gem install bundler [sudo] password for kali: Fetching bundler-2.5.10.gem Successfully installed bundler-2.5.10 Parsing documentation for bundler-2.5.10 Installing ri documentation for bundler-2.5.10 Done installing documentation for bundler after 0 seconds 1 gem installed

But the write issues then also cause problems when doing bundle install

┌──(kali㉿kali)-[~/eol/endoflife.date] └─$ bundle install Bundler 2.5.10 is running, but your lockfile was generated with 2.4.1. Installing Bundler 2.4.1 and restarting using that version. Fetching gem metadata from https://rubygems.org/. Fetching bundler 2.4.1

Retrying download gem from https://rubygems.org/ due to error (2/4): Bundler::PermissionError There was an error while trying to write to /var/lib/gems/3.1.0/cache/bundler-2.4.1.gem. It is likely that you need to grant write permissions for that path.

Retrying download gem from https://rubygems.org/ due to error (3/4): Bundler::PermissionError There was an error while trying to write to /var/lib/gems/3.1.0/cache/bundler-2.4.1.gem. It is likely that you need to grant write permissions for that path.

Retrying download gem from https://rubygems.org/ due to error (4/4): Bundler::PermissionError There was an error while trying to write to /var/lib/gems/3.1.0/cache/bundler-2.4.1.gem. It is likely that you need to grant write permissions for that path.

There was an error installing the locked bundler version (2.4.1), rerun with the --verbose flag for more details. Going on using bundler 2.5.10. Fetching gem metadata from https://rubygems.org/......... Fetching rake 13.2.0

Retrying download gem from https://rubygems.org/ due to error (2/4): Bundler::PermissionError There was an error while trying to write to /var/lib/gems/3.1.0/cache/rake-13.2.0.gem. It is likely that you need to grant write permissions for that path.

Retrying download gem from https://rubygems.org/ due to error (3/4): Bundler::PermissionError There was an error while trying to write to /var/lib/gems/3.1.0/cache/rake-13.2.0.gem. It is likely that you need to grant write permissions for that path.

Retrying download gem from https://rubygems.org/ due to error (4/4): Bundler::PermissionError There was an error while trying to write to /var/lib/gems/3.1.0/cache/rake-13.2.0.gem. It is likely that you need to grant write permissions for that path.

Fetching base64 0.2.0 Fetching bigdecimal 3.1.6 Fetching concurrent-ruby 1.2.3 Fetching connection_pool 2.4.1

Bundler::PermissionError: There was an error while trying to write to `/var/lib/gems/3.1.0/cache/rake-13.2.0.gem`. It is likely that you need to grant write permissions for that path. /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/shared_helpers.rb:105:in `rescue in filesystem_access' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/shared_helpers.rb:102:in `filesystem_access' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/rubygems_integration.rb:445:in `block in download_gem' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/retry.rb:40:in `run' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/retry.rb:30:in `attempt' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/rubygems_integration.rb:437:in `download_gem' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/source/rubygems.rb:475:in `download_gem' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/source/rubygems.rb:436:in `fetch_gem' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/source/rubygems.rb:420:in `fetch_gem_if_possible' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/source/rubygems.rb:162:in `install' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/installer/gem_installer.rb:54:in `install' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/installer/parallel_installer.rb:132:in `do_install' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/installer/parallel_installer.rb:86:in `call' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/installer/parallel_installer.rb:66:in `call' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/installer.rb:244:in `install_in_parallel' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/installer.rb:201:in `install' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/installer.rb:89:in `block in run' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/process_lock.rb:19:in `rescue in lock' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/process_lock.rb:15:in `lock' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/installer.rb:71:in `run' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/installer.rb:23:in `install' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/cli/install.rb:63:in `run' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/cli.rb:247:in `block in install' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/settings.rb:157:in `temporary' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/cli.rb:246:in `install' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/cli.rb:35:in `dispatch' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/cli.rb:29:in `start' /var/lib/gems/3.1.0/gems/bundler-2.5.10/exe/bundle:28:in `block in ' /var/lib/gems/3.1.0/gems/bundler-2.5.10/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors' /var/lib/gems/3.1.0/gems/bundler-2.5.10/exe/bundle:20:in `' /usr/bin/bundle:25:in `load' /usr/bin/bundle:25:in `
' An error occurred while installing rake (13.2.0), and Bundler cannot continue. In Gemfile: jekyll-feed was resolved to 0.17.0, which depends on jekyll was resolved to 4.3.3, which depends on jekyll-sass-converter was resolved to 3.0.0, which depends on sass-embedded was resolved to 1.74.1, which depends on google-protobuf was resolved to 4.26.1, which depends on rake So I have to do sudo bundle install, which it does say don't do. ┌──(kali㉿kali)-[~/eol/endoflife.date] └─$ sudo bundle install Don't run Bundler as root. Installing your bundle as root will break this application for all non-root users on this machine. Bundler 2.5.10 is running, but your lockfile was generated with 2.4.1. Installing Bundler 2.4.1 and restarting using that version. Fetching gem metadata from https://rubygems.org/. Fetching bundler 2.4.1 Installing bundler 2.4.1 Don't run Bundler as root. Installing your bundle as root will break this application for all non-root users on this machine. Fetching gem metadata from https://rubygems.org/......... Fetching rake 13.2.0 Installing rake 13.2.0 Fetching base64 0.2.0 Fetching bigdecimal 3.1.6 Fetching connection_pool 2.4.1 Fetching concurrent-ruby 1.2.3 Installing base64 0.2.0 Fetching drb 2.2.1 Installing connection_pool 2.4.1 Fetching minitest 5.22.2 Installing bigdecimal 3.1.6 with native extensions Installing concurrent-ruby 1.2.3 Installing drb 2.2.1 Fetching mutex_m 0.2.0 Installing minitest 5.22.2 Fetching public_suffix 5.0.5 Installing mutex_m 0.2.0 Using bundler 2.4.1 Fetching colorator 1.1.0 Fetching date 3.3.4 Installing public_suffix 5.0.5 Installing colorator 1.1.0 Fetching eventmachine 1.2.7 Fetching http_parser.rb 0.8.0 Installing date 3.3.4 with native extensions Installing http_parser.rb 0.8.0 with native extensions Installing eventmachine 1.2.7 with native extensions Using ffi 1.16.3 Fetching forwardable-extended 2.6.0 Installing forwardable-extended 2.6.0 Fetching gemoji 4.1.0 Installing gemoji 4.1.0 Fetching google-protobuf 4.26.1 (x86_64-linux) Installing google-protobuf 4.26.1 (x86_64-linux) Fetching racc 1.7.3 Installing racc 1.7.3 with native extensions Fetching ice_cube 0.16.4 Installing ice_cube 0.16.4 Fetching rb-fsevent 0.11.2 Installing rb-fsevent 0.11.2 Fetching rexml 3.2.6 Installing rexml 3.2.6 Fetching liquid 4.0.4 Installing liquid 4.0.4 Fetching mercenary 0.4.0 Installing mercenary 0.4.0 Fetching rouge 4.2.1 Installing rouge 4.2.1 Fetching safe_yaml 1.0.5 Installing safe_yaml 1.0.5 Fetching unicode-display_width 2.5.0 Installing unicode-display_width 2.5.0 Using webrick 1.8.1 Fetching posix-spawn 0.3.15 Installing posix-spawn 0.3.15 with native extensions Fetching mini_i18n 0.9.0 Installing mini_i18n 0.9.0 Fetching stringio 3.1.0 Installing stringio 3.1.0 with native extensions Fetching uri 0.13.0 Installing uri 0.13.0 Fetching i18n 1.14.4 Installing i18n 1.14.4 Using tzinfo 2.0.6 Fetching addressable 2.8.6 Installing addressable 2.8.6 Fetching rb-inotify 0.10.1 Installing rb-inotify 0.10.1 Fetching pathutil 0.16.2 Installing pathutil 0.16.2 Fetching sass-embedded 1.74.1 (x86_64-linux) Retrying download gem from https://rubygems.org/ due to error (2/4): Gem::RemoteFetcher::FetchError bad response Forbidden 403 (https://rubygems.org/gems/sass-embedded-1.74.1-x86_64-linux.gem) Retrying download gem from https://rubygems.org/ due to error (3/4): Gem::RemoteFetcher::FetchError bad response Forbidden 403 (https://rubygems.org/gems/sass-embedded-1.74.1-x86_64-linux.gem) Retrying download gem from https://rubygems.org/ due to error (4/4): Gem::RemoteFetcher::FetchError bad response Forbidden 403 (https://rubygems.org/gems/sass-embedded-1.74.1-x86_64-linux.gem) Fetching nokogiri 1.16.2 (x86_64-linux) Fetching icalendar 2.10.1 Installing icalendar 2.10.1 Fetching kramdown 2.4.0 Installing kramdown 2.4.0 Installing nokogiri 1.16.2 (x86_64-linux) Fetching terminal-table 3.0.2 Fetching jekyll-timeago 0.15.0 Installing terminal-table 3.0.2 Fetching listen 3.9.0 Installing jekyll-timeago 0.15.0 Fetching time 0.3.0 Installing listen 3.9.0 Fetching kramdown-parser-gfm 1.1.0 Installing time 0.3.0 Fetching jekyll-watch 2.2.1 Installing kramdown-parser-gfm 1.1.0 Fetching open-uri 0.4.1 Installing jekyll-watch 2.2.1 Installing open-uri 0.4.1 Fetching activesupport 7.1.3.2 Installing activesupport 7.1.3.2 Fetching html-pipeline 2.14.3 Installing html-pipeline 2.14.3 Fetching em-websocket 0.5.3 Installing em-websocket 0.5.3 Bundler::HTTPError: Could not download gem from https://rubygems.org/ due to underlying error /var/lib/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/rubygems_integration.rb:493:in `rescue in download_gem' /var/lib/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/rubygems_integration.rb:465:in `download_gem' /var/lib/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/source/rubygems.rb:485:in `download_gem' /var/lib/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/source/rubygems.rb:447:in `fetch_gem' /var/lib/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/source/rubygems.rb:431:in `fetch_gem_if_possible' /var/lib/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/source/rubygems.rb:158:in `install' /var/lib/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/installer/gem_installer.rb:54:in `install' /var/lib/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec' /var/lib/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/installer/parallel_installer.rb:155:in `do_install' /var/lib/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/installer/parallel_installer.rb:146:in `block in worker_pool' /var/lib/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/worker.rb:62:in `apply_func' /var/lib/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/worker.rb:57:in `block in process_queue' /var/lib/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/worker.rb:54:in `loop' /var/lib/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/worker.rb:54:in `process_queue' /var/lib/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads' An error occurred while installing sass-embedded (1.74.1), and Bundler cannot continue. In Gemfile: jekyll-feed was resolved to 0.17.0, which depends on jekyll was resolved to 4.3.3, which depends on jekyll-sass-converter was resolved to 3.0.0, which depends on sass-embedded I
marcwrobel commented 3 weeks ago

Thanks @baggers27.

Mmm, don't know what to do here. Closing this issue as it was circumvented and seems to me the issue in more on the Jekyll side than the endoflife.date side.