Home>

Programming first-school programming is running.
As you proceed with the tutorial, the AWS server has an error "Blocked Host:".
It is a question that I want to know how to solve this error.

Write the details of the status.
· It is anthropotheride who began to do the sixth edition of Rails-Tutorial.
· Promote the tutorial of Chapter 1 and move up to the place where "Rails Server" is run, and an error that occurred there.
· In the process of proceeding with the tutorial, "config.hosts.clear" was added to "/hello_app/config/environments/development.rb", and it was issued as indicated.
· As for errors, I searched for "Rails-Tutorial Blocked Host" etc., but again, I could not find only the above "CONFIG.HOSTS.CLEAR" and I could not find it. (Or, it was difficult to understand what you can not understand due to lack of your own knowledge, and it was too difficult to understand what to understand.)
· I also considered other causes, but I asked you because I did not think of myself.

or higher is the problem that you want to solve the situation and solve the situation.
If there is an insufficient information, it will be added.

I will write my own forecast below.
The Development.rb file just wrote config.hosts.clear, and there is no such thing as "save?". As I just mentioned, I thought that I needed something like save, so I tried to find out, but I could not search well.

Attach an image.

I'm glad if you can answer. Thank you.

~ /Rails-data /jQuery1_samp /config /environments /development.rb \ n The case is solved if the above item is added to the above item. In addition, I also received a message. config.hosts << server name "\ n ## Ruby 3.0 Rails6.1.3 \ N

nagao2021-04-19 07:44:48
  • Answer # 1

    @innu

    I also had the same error at the same place where I was in the tutorial.

    (Opened Preview Running Application with AWS Cloud9, blocked host:) is displayed)

    If I have a Gemfile and development.rb on AWS Cloud9 (Command + s after opening each file), run ubuntu: ~ /Enviroment /hello_app $ bundle Install to run When Rails Server was executed on the tab, the earlier error screen has disappeared.

    It may already be resolved, but I would like to help you and leave comments.

    I knew that I was able to meet this question, and I understood that the above error was not happening only, and I was able to calm down. Thank you!

  • Answer # 2

    The tutorial of Rails6 was charged, so I tried with Rails5.
    First of all, look at LOG and go to the bottom line
    Completed 200 OK
    If you're out, I think that you can see from your browser by clicking on the icon with an arrow at the right to the right to the right of the PREVIEW window address bar.
    If the numbers are not 200 (this is an HTTP response status code), I think that there is an error somewhere, so I think that you will be able to paste the log again on another topic.

  • Answer # 3

    After the Blocked Host error appears, can we consider the Development.rb to add config.hosts.clear and then do nothing thereafter?
    If so, click on the 'PUMA' tab in the lower row, press Ctrl + C (Press C at the same time as the Ctrl key on the keyboard) (stop Rails), write a Rails Server Please try again. What will happen?

    Thank you for your reply. · And an error (Block Host) has occurred. Since then, the server was closed once again with "Control C". -After the Development.rb has added [config.host.clear]. · After that, I made a Rails Server again. But the same error came out. By the way, we will report the current situation. If you try various other things, you were displayed as "~ .COM denied connection to .COM", and I thought that it was no longer possible, so a new environment again? I made it to the place where I made an error. And the same error (Block Host) came out. I'm glad if you could tell me if there is a cause of thinking.

    innu2021-04-19 07:44:48