I am completely stuck on lesson #3


#1

How do I finish step 2? This is what I typed:
get '/Messages' => 'Messages#index'
But this doesn't work.


#2

Hi Sundaresan,

You need to put down messages, with a lowercase “m”, rather than what you have right now, Messages :slight_smile:


#3

For step #2 I changed my code to this:
get '/messages' => 'messages#index'
but there is an error that says:
No route matches /messages
but the route does match /messages!


#4

@ajaxblaster80577 Could you paste in your entire code for the app/controllers/messages_controller.rb file?


#5

class MessagesController < ApplicationController
def index
@messages = Message.all
end
end


#6

@ajaxblaster80577 Hm, your code definitely looks correct :confused:

You are trying to go to this exact URL in the Codecademy-integrated browser, correct?

https://localhost:8000/messages

#7

I just realized that I had to reload the page.


#8

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.