Docker: v19.03.13 Ruby: v2.5.7 Rails: v5.2.4.4 pry: v0.13.1 pry-byebug: v3.9.0 PostgreSQL: psql (PostgreSQL) 13.0 (Debian 13.0-1.pgdg100+1)
In the Docker environment, I introduced Gem Pry-byebug
of Ruby on Rails, stopped processing and checked variables, parameters, and processing flow, but it suddenly stopped. .. ..
Really. suddenly.
In the display on the console, the =>
mark is attached at the breakpoint, but as shown below, it does not stop and the rendering starts through the breakpoint.
[1] pry (# <HomesController>)>
and the part where you can enter commands at the time of debugging are also displayed, but even though you have not done anything, it is passed through and rendered ...
It was my first behavior, so I looked it up on the internet, but there was no information anywhere, and I was addicted to it for about two days ...
From the conclusion, it works normally by deleting tmp
directly under the application root folder.
I wondered why I deleted the tmp folder, but when I was looking at the information including other languages on the net, I found out that the cache
was saved in tmp
, and said, "If this effect causes a problem. Is it happening ?? If it's a cache, it's okay to delete it ?? It's managed by Git, and if something goes wrong, I should return it ... ", and I tried deleting it. Lol
tmp refers to Temporary File (= temporary file) ... It will be a study. Lol
You got a hint from the naming of folders and files like this. I felt that it was important to know the meaning.
Even if you look at the Rails guide, it says that it is also a folder that stores action cache etc. However, what I think failed is the Rails guide
Empty tmp / cache with rails tmp: cache: clear. Empty tmp / sockets with rails tmp: sockets: clear. Empty tmp / screenshots with rails tmp: screenshots: clear. With rails tmp: clear, empty the cache, sockets and screenshot directories. Rails tmp: create creates tmp directories for cache, sockets and pids.
It was stated.
I regret that I could have deepened my understanding if I could execute this command to separate the folders instead of deleting them all at once. I couldn't figure out the cause because it returned to normal operation, but I hope you can try it if you find yourself in a similar situation.
Recommended Posts