Project

General

Profile

Actions

tickets #159624

closed

paste broke with Ruby 3.1.5

Added by crameleon 22 days ago. Updated 22 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Paste
Target version:
-
Start date:
2024-04-25
Due date:
% Done:

0%

Estimated time:

Description

Hi,

paste.i.o.o uses Ruby from devel:languages:ruby. Recently Ruby in d:l:ruby was updated to 3.1.5. With this, paste is now broken:

bundler.ruby3.1[5087]: /usr/lib64/ruby/3.1.0/bundler/definition.rb:432:in `validate_ruby!': Your Ruby version is 3.1.5, but your Gemfile specified 3.1.4 (Bundler::RubyVersionMismatch)

I tried to patch Gemfile

- ruby '3.1.4'
+ ruby '3.1.5'

but that then yields:

paste ():/srv/www/paste-o-o # sudo -u paste bin/rails db:migrate:status
rails aborted!
NoMethodError: undefined method `[]' for nil:NilClass

if (theme = Rails.configuration.site['theme'])
                                    ^^^^^^^^^
/srv/www/paste-o-o/config/initializers/theme.rb:3:in `<main>'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/engine.rb:667:in `load'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/engine.rb:667:in `block in load_config_initializer'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.5/lib/active_support/notifications.rb:208:in `instrument'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/engine.rb:666:in `load_config_initializer'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/engine.rb:619:in `each'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/engine.rb:619:in `block in <class:Engine>'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/initializable.rb:32:in `instance_exec'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/initializable.rb:32:in `run'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/initializable.rb:61:in `block in run_initializers'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/initializable.rb:50:in `each'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/initializable.rb:50:in `tsort_each_child'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/initializable.rb:60:in `run_initializers'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/application.rb:372:in `initialize!'
/srv/www/paste-o-o/config/environment.rb:7:in `<main>'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/application.rb:348:in `require_environment!'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/application.rb:506:in `block in run_tasks_blocks'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/command.rb:51:in `invoke'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/railties-7.0.5/lib/rails/commands.rb:18:in `<main>'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/srv/www/paste-o-o/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
Tasks: TOP => db:migrate:status => db:load_config => environment
(See full trace by running task with --trace)

If the paste software needs the Ruby from the devel project it should stay up to date with the changes there. Otherwise it is better if the software uses the stable Ruby shipped in the distribution repositories.

Actions #1

Updated by crameleon 22 days ago

  • Private changed from Yes to No
Actions #2

Updated by crameleon 22 days ago

  • Status changed from New to In Progress
  • Assignee changed from hellcp to crameleon

Forgot to set RAILS_ENV, with that, it works with 3.1.5 as well.

Submitted https://github.com/openSUSE/paste-o-o/pull/161.

Actions #3

Updated by crameleon 22 days ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF