Backward compatibility for Ruby 2.5.x + 2.6.x
Closed this issue · 2 comments
robbyrussell commented
Bonjour!
We were attempting to introduce cypress-rails to an existing Ruby on Rails application that is running on Ruby 2.5.x at the moment.
Stacktrace
With the most recent version(s) of cypress-rails, it fails on the following error:
(snipped the useful bits)
Traceback (most recent call last):
5: from /Users/robbyrussell/.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/cypress-rails-0.5.1/exe/cypress-rails:13:in `<main>'
4: from /Users/robbyrussell/.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/cypress-rails-0.5.1/lib/cypress-rails/open.rb:11:in `call'
3: from /Users/robbyrussell/.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/cypress-rails-0.5.1/lib/cypress-rails/launches_cypress.rb:20:in `call'
2: from /Users/robbyrussell/.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/cypress-rails-0.5.1/lib/cypress-rails/manages_transactions.rb:10:in `begin_transaction'
1: from /Users/robbyrussell/.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/cypress-rails-0.5.1/lib/cypress-rails/manages_transactions.rb:59:in `gather_connections'
/Users/robbyrussell/.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/cypress-rails-0.5.1/lib/cypress-rails/manages_transactions.rb:74:in `setup_shared_connection_pool': undefined method `bind_call' for #<UnboundMethod:0x00007fe9006c3c70> (NoMethodError)
Affected Versions
- cypress-rails
v0.5.2
- cypress-rails
v0.5.1
Likely Cause
Given that bind_call
was introduced in Ruby 2.7.x (link), and cypress-rails took advantage of this in 38e9357 (jump to change), it'll cause problems for apps running on older versions of Ruby.
Do you anticipate wanting to continue supporting 2.5.x and 2.6.x?
robbyrussell commented
In the meantime, we can begin to take advantage of this delightful gem by running v0.5.0.
gem 'cypress-rails', '0.5.0'
Until next time!
searls commented
Thanks for pointing this out. Fixed in 0.5.3