I am a programming beginner doing rails-tutorial.
As I proceeded with the tutorial, I received a Blocked host: error on the AWS server.
You want to know how to resolve this error.
I will write the details of the situation.
·I am a beginner who started the sixth edition of rails-tutorial.
"·This is an error that occurred when we proceeded with the tutorial in Chapter 1 and moved it to the point where ""rails server"" was executed."
"·In the course of the tutorial, I was instructed to add ""config.hosts.clear"" to ""/hello_app/config/environments/development.rb"", so I followed the instructions."
"·I searched ""rails-tutorial blocked host"" for the error, but I could only find it by adding ""config.hosts.clear"" above."(Or there was a solution that I couldn't understand due to my lack of knowledge, and it was so difficult that I didn't even know what to understand.)
·I thought about other causes, but I couldn't think of it myself, so I asked you a question.
These are the details of the situation and the problems you would like to resolve.
If there is any missing information, I will add it.
I will also write my own prediction below.
I just added config.hosts.clear to the development.rb file, but I didn't do anything like "save?" from there.I just wrote it down, so I thought I needed something like saving it, so I looked it up, but I couldn't search it well.
I have also attached an image.
I would appreciate it if you could reply.Thank you.
ruby-on-rails ruby aws
After the blocked host error occurs, can I add config.hosts.clear to development.rb and assume that nothing has been done since then?
If so, click on the 'puma' tab in the middle of the bottom and press CTRL+C (stop rails) (press c at the same time as CTRL key on keyboard) to write rails server and try again.What will happen?
Tutorials for rails6 were charged, so I tried rails5.
First, look at the log and
on the bottom line.
Completed 200 OK
If appears, click the Pop Out Into New Window icon on the far right side of the address bar in the preview window, and you will see it from your browser.
If the number is not 200 (this is called the HTTP response status code), I think there is an error somewhere, so please paste the log again on another topic.
Dear @innu,
While I was doing the tutorial, the same error occurred in the same place.
(When I opened the Preview Running Application in AWS Cloud 9, it said Blocked host:)
In my case, after overwriting and saving Gemfile and development.rb on AWS Cloud 9 (command+s after opening each file), I ran ubuntu:~/environment/hello_app$bundle install and ran rails server on a separate tab, but the error screen disappeared.
It may have already been resolved, but I would like to leave a comment to help someone.
When I came across this question, I realized that the above error was not just happening to me, and I was able to deal with it calmly.Thank you!
© 2024 OneMinuteCode. All rights reserved.