Reference: https://fuqda.hatenablog.com/entry/2019/03/21/204118 (It's definitely better to look at it here, because I'm just a memo)
With Docker installed in the development environment, devise was installed and the following command was executed to create a Japanese file to display error messages etc. in Japanese.
$ docker-compose run web rails g devise:views:locale ja
Then, the following error occurred.
Starting aoo_db_1 ... done
Could not find devise-i18n-1.9.2 in any of the sources
Run `bundle install` to install missing gems.
I can't find the gem devise-i18n-1.9.2
, so it seems that I should run bundle install
to insert the gem.
However, the Gem is well written, and the bundle install
passes without any problems, what is this? ?? However, when I looked it up, it seems that bundle install may not be executed in the cache.
The solution is OK if you execute the following command
$ docker-compose build --no-cache
After doing the above
$ docker-compose run web rails g devise:views:locale ja
When you run
Creating network "app_default" with the default driver
Creating app_db_1 ... done
create config/locales/devise.views.ja.yml
The Japanese file was created safely.
The cause is that I typed the command while the server was running, so it seems that bundle install
did not work and Gem was not installed correctly, so from the next time I will stop the server firmly, I want to be careful to do bundle install
.
Why should Gem be in it? !! ?? I was a little impatient, but when I looked it up, I found a countermeasure immediately, which was helpful. It ’s your ancestor! !! Only the ancestors won! !! !!