-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
ActiveRecord TypeError: can't dup Symbol #9808
Comments
Are you specifying your host, username, password, database, or port as a symbol? Without exposing sensitive information can you run
Then modify line 33 to be
Then try to initialize a DB connection and paste the output here? Don't forget to change that line back when done. |
I work with @DEfusion, and this is still a problem for us. We're communicating with a remote, non-Rails database via a custom mysql connection with symbolize_keys set like so:
I put a line similar to the one @schneems suggested. All of the output from Rails is arrays of strings like this:
While arrays from our remote db are of symbols like so:
I can fix this problem by changing the map to look like this:
And I can submit a PR for that, but it's not clear to me that it's actually the best solution. |
@muffinista could you provide the pull request so we can discuss the solution? |
Closed as stale. If you think it is still an issue let us know |
Running a query via
select_all
on a custom mysql2 connection is throwing aTypeError: can't dup Symbol
inActiveRecord::Result
line 33.The mysql2 connection is being made via the following:
Issue present in 3.2.13
The text was updated successfully, but these errors were encountered: