In the Rails application on AWS Cloud 9, the changes are not reflected when I check the page after starting up the local server on $rails server.

Asked 2 years ago, Updated 2 years ago, 43 views

We are currently working on the Ruby on Rails tutorial on AWS Cloud 9, the recommended environment.

Run $rails generate controller StaticPages home help in the Chapter 3, 3.2 Static Page 3.2.1 Generate Static Page section, and check the $rails server command just before launching the server =Only the hello,world! pages that you did in the https://railstutorial.jp/chapters/static_pages?version=6.0#sec-sample_app_setup"rel="nofollow noreferrer">3.1 setup section appear.

page displayed

There are no errors displayed on the terminal, and it's hard to find a particular hit when I search for it, and even if I restart Cloud9 or remove Cloud9 instances and re-configure them from scratch, I can't even think about what to do.

The GitHub repository is here.

If anyone knows, I would appreciate it if you could let me know.

ruby-on-rails ruby aws-cloud9

2022-09-30 10:19

1 Answers

I think the reason is that there is no routing configuration for static_pages.

https://github.com/Kawboy442/sample_app/blob/c7dbc6bb9b5897882df5f1cbba1ee8f94ea7ba73/config/routes.rb

How about adding the following definitions?

get 'static_pages/home', to: 'static_pages#home'
get'static_pages/help', to:'static_pages#help'


2022-09-30 10:19

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.