[RUBY] About the solution of the error that occurred when trying to create a Japanese file of devise in the Docker development environment

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! !! !!

Recommended Posts

About the solution of the error that occurred when trying to create a Japanese file of devise in the Docker development environment
Resolved the error that occurred when trying to use Spark in an environment where Java 8 and Java 11 coexist.
[Docker] List of errors that occurred when building the environment
[Be careful about changing the version of Xdebug! ] Create a development environment with Xdebug3 + docker + VS Code
Error response from daemon: conflict: Conflict when trying to create Docker container, so solution
Solution that gives an error when trying to connect to DB (MySQL) in Java
Verification value error that occurred in a clustering environment
I got an error when trying to install sbt to build a Scala development environment
What to do when ‘Could not find’ in any of the sources appears in the development environment with Docker × Rails × RSpec
A validation error occurred when saving to the intermediate table.
[Docker] The story that an error occurred in docker-compose up
I tried to create a padrino development environment with Docker
When I switched to IntelliJ, I got a lot of differences in the encoding of the properties file.
About the error that occurred when adding the column name in rails (rails db: migrate, rails db: rollback, add)
Solution for the error "no basic auth credentials" when pushing a Docker container to Heroku
When trying to insert a specific gem (levenshtein) with Docker, an error occurred without ruby-dev
One file of Docker x Laravel threat! Build a local development environment with the minimum configuration
A story of frustration trying to create a penetration environment on Ubuntu 20.04
[Programming beginner] What to do when rails s becomes an error in the local development environment
What I was addicted to when updating the PHP version of the development environment (Docker) from 7.2.11 to 7.4.x
A solution to Docker errors that beginners tend to get stuck in
A story that made me regret when a "NotReadablePropertyException" occurred during the development of the Spring Boot application.
Build a browser test environment using Capybara in the Docker development environment
About the solution to the problem that the log of logback is not output when the web application is stopped
Install Rails in the development environment and create a new application
The story of forgetting to close a file in Java and failing
[Rails] About the error when displaying the screen due to the autofocus of the form
A note of someone who stumbled when trying to create a Rails project
How to execute with commands of normal development language in Docker development environment
I tried to build a Firebase application development environment with Docker in 2020
[Rails] About the error that the image is not displayed in the production environment
Sample program that returns the hash value of a file in Java
I thought about the best way to create a ValueObject in Ruby
A story that was embarrassing to give anison file to the production environment
An error occurred when executing a function from MyBatis with the OUT parameter set to CURSOR in PostgreSQL.
Solution when you get the error Webpacker :: Manifest :: MissingEntryError in Devise :: Sessions # new
A troublesome story when deleting the gems file created in the gem development directory.
[Error resolution] Occurs when trying to build an environment for spring with docker
Introduce Docker to the development environment and test environment of existing Rails and MySQL applications
Build a development environment to create Ruby on Jets + React apps with Docker
How to set environment variables in the properties file of Spring boot application
A solution to an error that makes you angry that you are not following the MySQL default setting ONLY_FULL_GROUP_BY in a production environment and it is not unique.
A story about trying to operate JAVA File
A reminder of Docker and development environment construction
Create a Spring Boot development environment with docker
When I think about the 402 error that suddenly appeared in the middle of the introduction of PAY.jp, there was an unexpected place
I want you to put the story that the error was solved when you stabbed the charger in the corner of your head
How to deal with the error yaml.scanner.ScannerError: while scanning for the next token that appeared in Rails environment construction with Docker
How to install Docker in the local environment of an existing Rails application [Rails 6 / MySQL 8]
Error memorandum that occurred when creating a CI / CD environment [Rails + CircleCI + Capistrano + AWS]
Docker command to create Rails project with a single blow in environment without Ruby
Sample code to assign a value in a property file to a field of the expected type
A story that did not work when trying to handle events in Notification Center
I tried using Docker because I don't want to pollute the local environment in Microsoft Teams tab development of MS Learn
How to create a Java environment in just 3 seconds
Docker the development environment of Ruby on Rails project
A memorandum when trying to create a GUI using JavaFX
[Java] Get the file in the jar regardless of the environment
A command that definitely cleans the local docker environment
SSL in the local environment of Docker / Rails / puma
I learned about the existence of a gemspec file