You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What Ruby, Rails and RSpec versions are you using?
Ruby version: 2.2.2 (I know you don't support it anymore. That's the whole point of this bug!)
Rails version: Any
RSpec version: 4.0.0
Observed behaviour
When running ruby 2.2.2, rspec-rails 4.0.0 gets installed with even though it uses the safe navigation operator, which was not introduced until ruby 2.3.0
Expected behaviour
When installing the bundle, bundler should raise a Bundler::VersionConflict because rspec-rails 4.0.0 depends on ruby >= 2.3.0.
Can you provide an example app?
~/rspec-rails-ruby-2.2.2 $ cat test.rb
#! /usr/bin/env ruby
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'rails'
gem 'rspec-rails', '= 4.0.0'
end
require 'action_controller'
require 'action_view'
require 'rspec/rails'
~/rspec-rails-ruby-2.2.2 $ rvm 2.3.0 do ./test.rb # This completes without errors
~/rspec-rails-ruby-2.2.2 $ rvm 2.2.2 do ./test.rb
~/.rvm/gems/ruby-2.2.2/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in `require': ~/.rvm/gems/ruby-2.2.2/gems/rspec-rails-4.0.0/lib/rspec/rails/example/mailer_example_group.rb:25: syntax error, unexpected '.' (SyntaxError)
options&.each { |key, value| default_u...
^
from ~/.rvm/gems/ruby-2.2.2/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in `block in require'
from ~/.rvm/gems/ruby-2.2.2/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:257:in `load_dependency'
from ~/.rvm/gems/ruby-2.2.2/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in `require'
from ~/.rvm/gems/ruby-2.2.2/gems/rspec-rails-4.0.0/lib/rspec/rails/example.rb:6:in `<top (required)>'
from ~/.rvm/gems/ruby-2.2.2/gems/rspec-rails-4.0.0/lib/rspec/rails.rb:14:in `require'
from ~/.rvm/gems/ruby-2.2.2/gems/rspec-rails-4.0.0/lib/rspec/rails.rb:14:in `<top (required)>'
from ~/rspec-rails-ruby-2.2.2/test.rb:14:in `require'
from ~/rspec-rails-ruby-2.2.2/test.rb:14:in `<main>'
The text was updated successfully, but these errors were encountered:
Yes we're aware, this is a duplicate of #2319 the issue is that we hard support Rails 5 and 6, with all there requisite Ruby versions, but didn't update the version constraint with an effort to soft support Rails 4.2 for this transitionary version, but overlooked a hard minimum ruby version, its hard to fix due to ruybgems rules unforuntately.
Uh oh!
There was an error while loading. Please reload this page.
What Ruby, Rails and RSpec versions are you using?
Ruby version: 2.2.2 (I know you don't support it anymore. That's the whole point of this bug!)
Rails version: Any
RSpec version: 4.0.0
Observed behaviour
When running ruby 2.2.2, rspec-rails 4.0.0 gets installed with even though it uses the safe navigation operator, which was not introduced until ruby 2.3.0
Expected behaviour
When installing the bundle, bundler should raise a
Bundler::VersionConflict
because rspec-rails 4.0.0 depends on ruby >= 2.3.0.Can you provide an example app?
The text was updated successfully, but these errors were encountered: