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

NameError: uninitialized constant Mysql2::Client::LONG_PASSWORD #1376

Open
ShaggyDishu opened this issue Aug 14, 2024 · 4 comments
Open

NameError: uninitialized constant Mysql2::Client::LONG_PASSWORD #1376

ShaggyDishu opened this issue Aug 14, 2024 · 4 comments

Comments

@ShaggyDishu
Copy link

i just started working on a project it has rails 3.2.22.5 and using mysql2 gem version 0.3.11,

i am getting the following error:

NameError: uninitialized constant Mysql2::Client::LONG_PASSWORD

how can i fix it?

@Faq
Copy link

Faq commented Aug 15, 2024

You get this when bundle install?
try bundle install --trace and post what you get.

@sodabrew
Copy link
Collaborator

These are extremely old versions, as I'm sure you're aware. That particular version of mysql2 gem is not the last of the 0.3.x series, so you should first try version 0.3.21, the last of the 0.3.x versions: https://rubygems.org/gems/mysql2/versions/0.3.21

What version of mysql are you linking against? You should be using the "most recent" version of the older client library, probably MySQL 5.1.73 (last of the 5.1 series) given the age of your other components, or similarly another "last of the series" for 5.5 or 5.6. Definitely don't go any newer, you'll start to run into other issues.

Finally, again because of the age of your components, I recommend looking for a paid support contract agency that specializes in older Rails. They should offer bugfix-and-security-backport versions in a way that meets your needs that are beyond the capacity of a small open source project to offer (in other words: I will not accept pull requests that "fix" the 0.3.x branch. It is done and closed.)

@ShaggyDishu
Copy link
Author

@Faq i get this error while running db:migrate

ps: i am using docker desktop to setup this project

@Faq
Copy link

Faq commented Aug 17, 2024

But then you saw
Tasks: TOP => db:migrate (See full trace by running task with --trace)

Add it and post whole output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants