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

Make driver: :chrome work again #48

Open
jmuheim opened this issue Apr 1, 2015 · 0 comments
Open

Make driver: :chrome work again #48

jmuheim opened this issue Apr 1, 2015 · 0 comments

Comments

@jmuheim
Copy link
Owner

jmuheim commented Apr 1, 2015

See http://stackoverflow.com/questions/29387097/capybara-and-chrome-driver-sqlite3busyexception-database-is-locked.

# To make chrome driver work, we need to monkey patch active record, otherwise we get an "SQLite3::BusyException: database is locked". See http://stackoverflow.com/questions/29387097.
class ActiveRecord::Base
  mattr_accessor :shared_connection
  @@shared_connection = nil

  def self.connection
    @@shared_connection || retrieve_connection
  end
end
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant