Ask A Question

Notifications

You’re not receiving notifications from this thread.

docker mysql

roberto santelices asked in Rails
Hey guys i was wondering if you ever get to connect a rails app in local host without dockerizing it and be able to use a docker image of mysql with it.

i already got the mysql image running in docker ps but i would like to be able to get access to it from my rails apps that are not dockerized anybody knows how to achieve this?
Reply

hi roberto, i don't know to achieve this, but I am curious if you figured out any answers. I am doing work on an older rails app and connecting to mysql using the mysql2 gem has been a challenge for me. I am trying docker so I can change around versions of the mysql2 gem (working production app uses mysql2 v 3.21), mysql (going between 5.7 and 8.026), and ruby but I need to keep rails at 3.2.22. If anyone has links to working docker files or docker compose files that accomplish this or general resources they have found helpful for an environment similar to this, I am all ears. Thanks much!

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.