Home>

Chapter 3 of the rails tutorial.
I connected to the server.

ubuntu: ~/environment/sample_app (static-pages) $rails s
=>Booting Puma
=>Rails 6.0.3 application starting in development
=>Run `rails server --help` for more startup options
Puma starting in single mode ...
* Version 4.3.4 (ruby 2.6.3-p62), codename: Mysterious Traveler
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp: //127.0.0.1:8080
* Listening on tcp: // [:: 1]: 8080
Use Ctrl-C to stop


Then a display like the image below appears

In the sample, the following contents were displayed.

StaticPages # home 
<p>Find me in app/views/static_pages/home.html.erb</p>


Since it says File not Found, I expect that there is a problem with the routing or controller, but if you follow the procedure of the tutorial, they directly accessed the URL and displayed the page without touching it, so the result is reflected. I'm in trouble.

I would appreciate it if you could teach me the solution.

  • Answer # 1

    Preview-The method seems to be wrong.

    After starting the server, click preview → Preview Running Application at the top of the screen, press the enlarge button of the inline browser, and check the operation in another tab.

    You should be able to see the page by adding an arbitrary path to the end of the address bar of the URL.

    Example: https: // your unique value.vfs.cloud9.us-east-1.amazonaws.com/static_pages/home

Related articles