Hey! I am kind of stuck on this problem with getting started with Rails. The thing is, I’ve previously not had this problem. I was following this guide: Ruby On Rails In 60 Minutes - YouTube and everything worked fine up until 30 minutes in and only some text was being shown on the screen (one h1 tag but not my p tag). My controllers worked with my views and the server ran well but then I started messing with something in the db folder in one of my rails projects and now I get this:
-
Here is the github link with relevant files to the question first:
-
I deleted all projects and created new ones. Here is the data from the recently configured rails project:
- found in github file: railsfile
-
Here is what I get when I start the server AND navigate to the home page
- found in github file: serverinfo
-
Now I create my posts_controller output in:
- found in github file: postController
-
Now I right click the ‘posts’ folder inside of the views folder and create an index.html.erb file.
-
After that I populate the file with a paragraph tag and save it.
-
After that I go into the posts_controller.rb file and define an action called index.
-
After that I go into the config folder and into the routes.rb file and declare my root to be the posts controller and the index as the action.
-
Now I refresh and get the error I had above here is what the server said:
- found in github file: servererrorinfo
Hey, thanks for reading it all. I hope I have given enough information. I have googled questions with the same answer but none of the stuff is relevant to what is going on. I am having an issue with the controller reaching the index.html.erb file. It’s saying it’s not there, I looked over the rails project creation files and it said something like request is deprecated. Could it be something with a model? I did everything(that I know of) that the guy said on the video, and it doesn’t work for me. Thanks for the help.
Here’s the compiled image to help out: