Skip to content

Commit

Permalink
Remove bundle load when checking activerecord database connection
Browse files Browse the repository at this point in the history
  • Loading branch information
vovimayhem authored Nov 28, 2020
1 parent b78d4bd commit ef8d153
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/on_container/dev/active_record_ops.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,7 @@ def activerecord_config
end

def establish_activerecord_database_connection
unless defined?(ActiveRecord)
require 'rubygems'
require 'bundler'

Bundler.setup(:default)

require 'active_record'
end

require 'active_record' unless defined?(ActiveRecord)
ActiveRecord::Base.establish_connection activerecord_config
ActiveRecord::Base.connection_pool.with_connection { |connection| }
end
Expand Down

0 comments on commit ef8d153

Please sign in to comment.