[Rails & Docker & MySQL environment construction] Could not find gem ‘mysql2 (> = 0.4.4, <0.6.0)’ in any of the gem sources listed in your Gemfile.

Overview

This is the first post.

While watching this video while building the environment docker-compose buildrear docker-compose upAfter executing

Could not find gem ‘mysql2 (>= 0.4.4, < 0.6.0)’ in any of the gem sources listed in your Gemfile.


 I got the error.


# Development environment
macOS catalina
 Version 10.15.7


# What I tried
 For the time being, Gugu

 * Reinstall myslq
 + Update from ruby ​​2.5.8 to 2.6.6
 + Reconfigure docker desktop

 I tried various other things, but I tried various things, but the event did not change.
 4 hours have passed.
 The rising sun is about to cry.

# Solutions


```docker-compose run web bundle install```
```docker-compose up```
 It was solved by executing in the order of.


Recommended Posts

[Rails & Docker & MySQL environment construction] Could not find gem ‘mysql2 (> = 0.4.4, <0.6.0)’ in any of the gem sources listed in your Gemfile.
What to do when ‘Could not find’ in any of the sources appears in the development environment with Docker × Rails × RSpec
Could not find coderay-1.1.3 in any of the sources (Bundler :: GemNotFound) during co-development
[Rails & Docker & MySQL environment construction] I started the container, but I can't find MySQL ...?
What to do if Could not find hoge in any of the sources Run `bundle install` to install missing gems. Appears in the docker container
SSL in the local environment of Docker / Rails / puma
How to install Docker in the local environment of an existing Rails application [Rails 6 / MySQL 8]
For those who want to use MySQL for the database in the environment construction of Rails6 ~.
What I did when I was addicted to the error "Could not find XXX in any of the sources" when I added a Gem and built it
Rails + MySQL environment construction with Docker
[Environment construction with Docker] Rails 6 & MySQL 8
[Docker] Development environment construction Rails6 / Ruby2.7 / MySQL8
When composer install/require in the Docker container, it becomes `Could not find package`
Rails6 [API mode] + MySQL5.7 environment construction with Docker
Improve the performance of your Docker development environment
Procedure for introducing Docker into the development environment of existing Rails applications [Rails, MySQL, Docker]
Environment construction method and troubleshooter at the time of joint development (rails, docker and github)
virtulbox + vagrant + Docker + nginx + puma + MySQL Rails environment construction
Docker the development environment of Ruby on Rails project
Environment construction of Rails5 + MySQL8.0 + top-level volumes with docker-compose
Rails Docker environment construction
What to do when a could not find driver appears when connecting to a DB in a Docker environment
Install by specifying the version of Django in the Docker environment
Setting the baseURL in the axios module of Docker environment Nuxt
Easy environment construction of MySQL and Redis with Docker and Alfred
Rails application development environment construction with Docker [Docker, Rails, Puma, Nginx, MySQL]
MySQL 5.7 (Docker) environment construction memo
[Docker] Rails 5.2 environment construction with docker
[Rails / MySQL] Mac environment construction
The story of stopping because the rails test could not be done
"Rails 6 x MySQL 8" Docker environment construction procedure for sharing with teams
Rails on Docker environment construction procedure
Check MySQL logs in Docker environment
[Rails] About the error that the image is not displayed in the production environment
Run Redmine in the local environment of Windows10 Pro-Use Docker Desktop for Windows
How to solve the local environment construction of Ruby on Rails (MAC)!
[Rails] The cause of not being able to post was in form_with