-
Notifications
You must be signed in to change notification settings - Fork 483
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
PostgresSQLAdapter being used when using a SQLite3 database #224
Comments
I have similar symptoms for MySQL database and RSpec:
|
I got some error as well using MySQL and RSpec, using truncation for features specs with js. Using Rails 3.1.6.
|
I also have this problem. Do not know what to do:
I use |
Similar problems in this issue: #209 |
Same problem in Rails 4 |
@nepalez So it works for < 1.1.0 ? |
Yes |
Even downgrading didn't work for Rails 3.1.6. |
I downgraded to |
+1. Using |
Same error occurs with Rails 4 and activerecord-sqlserver-adapter (fork https://github.com/arthrex/activerecord-sqlserver-adapter which currently only runs on Rails4). |
+1 |
+1 |
@nepalez - Thanks! Downgrading the database cleaner gem helped. |
@nepalez Thanks as well, tripped me up for a second. |
I've hit this problem, too, when running globalize3 specs. Downgrading to 1.0.1 removes this particular problem, per svenfuchs/globalize3@aae2c33 @bmabey I assume you saw this? |
Are the following lines including the |
Yes, it looks like that to me too. |
Yes, the problem is that |
How about we don’t run code for an adapter we’re not using? |
That would handle the case for projects that only are using a single adapter but some projects use multiple DB adapters. |
Does this help? #221 |
I also faced this issue with version 1.1.1 and also with "gem 'database_cleaner', github: 'bmabey/database_cleaner'" on rails 4.0. So moved back to "<1.1.0", which resolved the issue. |
I also faced the same problem with rails 3.2.12 move to 'database_cleaner', '< 1.1.0' fix the issue. |
+1 |
+1 for 'database_cleaner', '< 1.1.0' |
Works on Refinery CMS! |
+1 for latest changes in master. |
Master (commit 1ce7c99) works for me! Nice job! |
Works for me too. |
Just pushed |
🍻 |
The tests were failing with: ~/.rvm/gems/ruby-2.0.0-p247/gems/database_cleaner-1.1.0/lib/database_cleaner/active_record/truncation.rb:123:in `db_version': undefined local variable or method `postgresql_version' for #<ActiveRecord::ConnectionAdapters::SQLite3Adapter:0x007fd28ac70df8> (NameError) Here's the bug report: DatabaseCleaner/database_cleaner#224 Looks like it might be a while until a fix happens so for the time being we'll pin database_cleaner to version 1.0.1 which appears to work.
> 1.0.1 is retarded. DatabaseCleaner/database_cleaner#224
I'm beginning using Cucumber along with
database_cleaner
in a Rails 4 app. I'm usingsqlite3
as my testing database. A scenario I'm writing would pass if it weren't for this:My suspicion is that the connection adapter is being incorrectly set somewhere.
Let me know if there's any other info I can provide.
The text was updated successfully, but these errors were encountered: