Actions
Patch #37883
closedLimit mocha version to < 2.0.0 when Ruby version is < 2.7 to avoid test error
Description
Today, I encountered the following "LoadError: cannot load such file -- ruby2_keywords" error, when executing test with ruby 2.6.
% bundle exec rails test
/Users/sanak/Build/rb/redmine42/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `require': cannot load such file -- ruby2_keywords (LoadError)
from /Users/sanak/Build/rb/redmine42/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `block in require'
from /Users/sanak/Build/rb/redmine42/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:257:in `load_dependency'
from /Users/sanak/Build/rb/redmine42/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `require'
from /Users/sanak/Build/rb/redmine42/vendor/bundle/ruby/2.6.0/gems/mocha-2.0.0/lib/mocha/mock.rb:1:in `<top (required)>'
:
- 2022/11/03: https://github.com/sanak/redmine_text_blocks/actions/runs/3350392379/jobs/5616832150#step:12:9
so, when ruby < 2.7, mocha should be < 2.0.0.
I upload a patch for that, but I am not sure whether it is enough, so reviewing it is helpful.
Files
Related issues
Updated by Go MAEDA about 2 years ago
- Subject changed from Limit mocha < 2.0.0 when ruby < 2.7 to avoid test error to Limit mocha version to < 2.0.0 when Ruby version is < 2.7 to avoid test error
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Target version set to 4.2.9
Committed the fix. Thank you for your contribution.
Updated by Go MAEDA over 1 year ago
- Related to Patch #39070: Allow using the latest version of mocha even when using Ruby < 2.7 added
Actions