In the exercises in Chapter 1 of the Ruby on Rails tutorial, I got the error "Blocked Host: my host name" all the time, and after trying various things for a long time, I did not do a certain fundamental thing. I noticed it and solved it, so I posted this post.
What is often written on the Web is
(I). Programs 1 and 2 were added to development.rb in a different application. For example, if the application you are creating is hello_app, you have added programs 1 and 2 to development.rb in a different application (eg a_app). This only allows the host for a_app, not the host for hello_app. The reason why I made a mistake is that there are two hierarchical structures, environment / hello_app / config / environment / development.rb, so if you are in the same environment, you can rewrite one development.rb to make it all. It was due to the misunderstanding that it would be reflected. The hierarchy of development.rb is as above, and there is one file for each application. By no means common. Let's rewrite development.rb in config / environment in the application you are creating as 1 and 2.
(II) After rewriting .development.rb, "rails server" was not executed. As for the order, if you do not follow the procedure "Rewrite the program in development.rb-> Execute rails server", no matter how much you follow step (I), the error will still occur.