I'm having trouble getting things to work can someone help me?


I want to talk to ppl having trouble so we can solve things together, then we can program! dont you think im right?

  • 1 i need help
  • 2 lots of ppl need help
  • 3 we can help each other
    Dont you agree?


I am having lots of issues with saving data section of RoR as well.
Nothing actually works on my screen,
What is your problem?


Generate a controller named Messages., how do i do this


Hey ricbundy, try using Rails generate controller Messages


Typically you passing a request to the controller to generate 'Messages' with action index.
what I did and it works for me is this:

rails generate controller Messages index


I'm having trouble with the "In the routes file, create a route that maps requests to messages/new to the Message controller's new action." excersise. Can someone help me with what i need to type?


try this
get '/messages/new' => 'messages#new'


Am I missing something here with Codecademy? It seems that there's never really enough information to complete the task at hand.

Am I suppossed to be learning all the information from the net or the Forums here?

It seems that the classes are rarely self contained.


ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ ಠ_ಠ
20 characters


Generate a controller named Messages
Surprising simple once i'd gone back to the 1st lesson and got the command.
rails generate model [model name]
in this case the model name is Messages

In the routes file, create a route that maps the URL /messages to the Messages controller's index action.
Very poorly described. in the config folder open the file routes.rb and on the 2nd line enter

get '/messages' => 'messages#index'

Then in the Messages controller (app/controllers/messages_controller.rb), add an index action:

 def index 
      @messages = Message.all 

Follow the instructions above and add the code on line 2.

Hopefully that should get you through.
Seems to be poorly explained and with no helpful information on the instrucitons


This is one of those things where you have to keep restarting the workspace until you see the messages_controller file in the controllers pop up with the data from step 3 filled in, then delete that and re-fill it when you finish step 2, which you can do now. Its a common bug in this Ruby on Rails tutorial. After that the answer is indeed to add " get ‘messages’ => ‘messages#index’ " on line 2 of the routes.db file. They need to fix the bugs in this tutorial, they’re numerous and horrible and confusing.


This topic is inactive.