Relatively new to Rails, but so far I have never had weird issues like this. I was having a lot of configuration issues while trying to do a bundle install
on existing Rails apps. And brew install mysql
did not help so I decided to create a container for mysql alone and use it for an existing Rails app.
These are what I have done so far
- Created a docker container with MySQL image.
- Went into my container to see if it connects to mysql commandline within it.
- Tried running
bundle install
again but this shows up.
4) Tried to change my database.yml
as such
default: &default
...Other settings...
adapter: mysql2
host: mysql
port: 3306
where mysql
is the container name. Did not work.
- I also read about
Dockerfile
andDocker compose
- got extremely confused with the whole thing. I have just a single MySQL container that I would like to connect to my Rails app.
So, I'm here right now, frustrated for two days since the beginning of Hacktoberfest unable to run my Rails apps locally to start making contributions.
I don't how to fix this issue and connect mysql
and my Rails
app.
I understand that this is a newbie question but please help or let me know what other details I have to provide.