Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue where sqlite3 doesn't bundle properly with Rails 7 and below #53

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

Fryguy
Copy link
Member

@Fryguy Fryguy commented Apr 29, 2024

@agrare Please review. This gets master back to green. We had a similar problem in active_record-virtual_attributes. I haven't had a chance to dig in as to what exactly is happening, but the error during bundling before this change is:

An error occurred while loading spec_helper. - Did you mean?
                    rspec ./spec/spec_helper.rb

Failure/Error: ActiveRecord::Base.establish_connection :adapter => "sqlite3", :database => ":memory:"

LoadError:
  Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? can't activate sqlite3 (~> 1.4), already activated sqlite3-2.0.1-arm64-darwin. Make sure all dependencies are added to Gemfile.
# /Users/jfrey/.gem/ruby/3.1.4/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/sqlite3_adapter.rb:13:in `<top (required)>'
# /Users/jfrey/.gem/ruby/3.1.4/gems/activesupport-6.1.7.7/lib/active_support/dependencies.rb:332:in `block in require'
# /Users/jfrey/.gem/ruby/3.1.4/gems/activesupport-6.1.7.7/lib/active_support/dependencies.rb:299:in `load_dependency'
# /Users/jfrey/.gem/ruby/3.1.4/gems/activesupport-6.1.7.7/lib/active_support/dependencies.rb:332:in `require'
# /Users/jfrey/.gem/ruby/3.1.4/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:1205:in `resolve_pool_config'
# /Users/jfrey/.gem/ruby/3.1.4/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:1046:in `establish_connection'
# /Users/jfrey/.gem/ruby/3.1.4/gems/activerecord-6.1.7.7/lib/active_record/connection_handling.rb:52:in `establish_connection'
# ./spec/spec_helper.rb:98:in `<top (required)>'
# ------------------
# --- Caused by: ---
# Gem::LoadError:
#   can't activate sqlite3 (~> 1.4), already activated sqlite3-2.0.1-arm64-darwin. Make sure all dependencies are added to Gemfile.
#   /Users/jfrey/.gem/ruby/3.1.4/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/sqlite3_adapter.rb:13:in `<top (required)>'
Run options: include {:focus=>true}

@agrare agrare self-assigned this Apr 29, 2024
@Fryguy
Copy link
Member Author

Fryguy commented Apr 29, 2024

See also sparklemotion/sqlite3-ruby#529

@agrare agrare merged commit d2813aa into ManageIQ:master Apr 29, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants