-
-
Notifications
You must be signed in to change notification settings - Fork 357
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
Issue after upgrading to 0.7.5: No connection pool with id primary found. #214
Comments
Hi @rdvdijk :) That's an interesting error. Just looking at your code, the only unusual things I see is that you're nesting your classes in a If you can experiment with those two aspects and get back to me, that would be a huge help :) If it's still failing, the next step would be to try to create a failing test case with our test suite. It's very easy to get the test suite up and running, so give this a go and let me know if you get stuck. |
Note that this is not a Rails project, but stand-alone usage of ActiveRecord. Another thing I've just realized, I have this in my gem 'acts_as_list', "0.7.5", require: false I think the (I'm currently at work, I'll report back when I get around to testing this tonight.) |
I wrote:
That doesn't seem to work either. If I do not require
|
@brendon I started a small test-project to try and replicate this issue. The solution turned out to be extremely trivial, but interesting nonetheless: My old code used |
@rdvdijk, thanks for digging into that a bit deeper. I wonder what part is requiring the active database connection? @swanandp, do you have any ideas? I've come across this with the At least you've hopefully found the fix for your situation however :) |
Line 77 of list.rb is accessing the connection: quoted_position_column = connection.quote_column_name(configuration[:column]) The Looks to me like quoting the column name could probably be postponed and done inside the |
I see what you mean :) The |
Thanks @rdvdijk ! I have been meaning to get rid of the class_eval for some time now. |
I'm getting a
No connection pool with id primary found
error when using ActiveRecord 5.0.0 withacts_as_list
0.7.5. All works fine 0.7.4.Here is the top of the stack trace:
The code in question looks like this:
And for the sake of completion,
Playlist
is:The text was updated successfully, but these errors were encountered: