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
Sequel::Mysql2::Dataset problem with Sequel::Postgres::Database #1034
Comments
My guess is that one of your dependencies is creating a Sequel::Database object, and since that is the first Sequel::Database object created, it's the default model database. Try: In the future, note that as mentioned in the contribution guidelines, general help questions like this should be asked on the sequel-talk Google Group or IRC. GitHub Issues should only be used if you are fairly certain there is bug in Sequel itself, it should not be used as a help forum. |
@jeremyevans That was it. It's working as expected now. I realize that this isn't a bug, but where can I find what you told me in the documentation? If it's missing, I'd be happy to submit a PR with this info for the right section. Next time I'll ask in the Google Group. |
Well, setting the default database for models is covered in the method RDoc (http://sequel.jeremyevans.net/rdoc/classes/Sequel/Model/ClassMethods.html#method-i-db), but I agree this isn't well covered by any of the guides. If you can think of a good place to mention this in the documentation, I'll definitely accept a patch for it. Which library were you using that was creating a Database object? Libraries that create Database objects should generally be using the block form so things like this don't happen. If I know the library, I can probably send them a pull request to fix this behavior. |
Hi,
I'm getting this error:
The odd thing is that AFAIK it shouldn't be using Sequel::Mysql2::Dataset, it should be using Sequel::Postgres::Dataset.
This is how I'm connecting to the database:
I've checked that the URL is correct:
This is what my Gemfile.lock looks like:
Do you know what could be wrong with my code? Why isn't it using Sequel::Postgres::Dataset?
Thank you!
The text was updated successfully, but these errors were encountered: