gocardless / statesman

A statesmanlike state machine library.
https://gocardless.com/blog/statesman/
MIT License
1.78k stars 163 forks source link

Set mysql2 version '~> 0.4.0' to fix rails-429-mysql CI builds #317

Closed kymmt90 closed 6 years ago

kymmt90 commented 6 years ago

Now CI builds for Rails 4.2.9 + MySQL are failing (ex. #316) because of the dependency problem.

An error occurred while loading ./spec/generators/statesman/active_record_transition_generator_spec.rb.
Failure/Error: ActiveRecord::Base.establish_connection(db_conn_spec)

Gem::LoadError:
  Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
# ./spec/spec_helper.rb:65:in `block in <top (required)>'
# ./spec/spec_helper.rb:16:in `<top (required)>'
# ./spec/generators/statesman/active_record_transition_generator_spec.rb:1:in `require'
# ./spec/generators/statesman/active_record_transition_generator_spec.rb:1:in `<top (required)>'
# ------------------
# --- Caused by: ---
# Gem::LoadError:
#   can't activate mysql2 (< 0.5, >= 0.3.13), already activated mysql2-0.5.1. Make sure all dependencies are added to Gemfile.
#   ./spec/spec_helper.rb:65:in `block in <top (required)>'

Active Record 4.2.9 depends on mysql2 on '>= 0.3.13', '< 0.5'. But mysql2 0.5.1 (current latest) is installed because it is specified as ~> 0.4 in gemspec so that builds are failing.

316 needs this fix to pass checks.