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


#1

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?

#2

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


#3

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


#4

Hey ricbundy, try using Rails generate controller Messages


#5

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


#6

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?


#7

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


#8

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.


#9

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


#10

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 
    end

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


#11

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.


#12

This topic is inactive.