Ask A Question

Notifications

You’re not receiving notifications from this thread.

Rails for Beginners Part 5: Routes and Route Types Discussion

I created a step-by-step guide based on this episode: You can view (and comment) at
https://paper.dropbox.com/doc/Rails--BFV_Qh2SUZc9DFBVuC8x6vv2AQ-zLMtQn23IqxkoP6tdzbjL

Reply

Thanks buddy :p

Reply

Thanks

Reply

Thanks for this, I've tried to follow the guide but get an error page:

wrong constant name [route]Controller inferred by Module from file
/Users/benjaminperry/schedule_tweets/app/controllers/[route]_controller.rb
Possible ways to address this:

  • Tell Zeitwerk to ignore this particular file.
  • Tell Zeitwerk to ignore one of its parent directories.
  • Rename the file to comply with the naming conventions.
  • Modify the inflector to handle this case.
Reply

You are a really great teacher. great content.

Reply

Hi,
I'm getting following error when i open http://localhost:3000/about
AboutController#index is missing a template for request formats: text/html

Please let me know how to resolve this issue.

Reply

Hi,
I was getting the same error. Turned out I created about folder inside app/views/layouts, while it should be in app/views.

Reply

@Kate

Thanks a lot for your solution !

Reply

Yep, @Kate nailed it (thanks @Kate!)
I was facing the same issue and that was my problem. You have to right click on the word "about", otherwise VSCode will create a folder within views/layouts.

Reply

Thanks @Kate you helped me a lot with this.

Reply

Hi, I like this playlist very much.
After seeing this video I had one doubt in my mind.
Is it necessary to create files under controller folder with names in format url_controller.rb. Can't we name them differently.

Reply

Rails use a principle called "convention over configuration" => check this out to read up on it.
https://www.bigbinary.com/learn-rubyonrails-book/rails-core-principles
Basically, if you want to be able to benefit from rails helpers you need to respect the naming conventions if you don't all hell breaks lose.

Reply

Some issues we discovered

  1. "webpack" need to be started - https://github.com/excid3/scheduled_tweets#boot-instructions
  2. In the above link, bin/webpacker-dev-server is wrong file name, should be bin/webpack-dev-server
Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.