ActionController : Exception caught

Hi Yati,

I am running MySql 5.0.77 and Ruby 2.2.2 I am able to add records - howeevr when I start the server, I am geting following error message. Please help. I am anot able to see the GUI.

I'm guessing you're new to RoR and haven't learned how to read the error messages. Hope this helps.

ArgumentError in UsersController#index

The error is in users_controller.rb in the index method.

NULL pointer given

A NULL pointer is being passed to to something

RAILS_ROOT: C:/workspace/testapp

in the Rails application named 'testapp'

Application Trace | Framework Trace | Full Trace (eval):3:in `each_hash' (eval):3:in `all_hashes'

ah... it's a null pointer in a hash, which probably means it involves a key rather than a value.

app/controllers/users_controller.rb:3:in `index'

The specific problem can be found in line 3 of users_controller.rb which is inside the index method.

The stack trace past here is, for your purposes, typically noise, not signal.

Without seeing the actual code, it's not possible to nail it down further than that. Post the code if you need more help.

Best regards, Bill

Thanks Bill for your reply. Yes, I am new to ROR. Please tell me where am I wrong. I have attached code.

Thanks, Yati

Attachments: http://www.ruby-forum.com/attachment/3405/testday2.zip

It's more typical to simply copy the relevant pieces of code than to zip an entire project. However, the error message you cited in your initial post...

ArgumentError in UsersController#index NULL pointer given

probably wasn't generated by the code you attached inasmuch as it didn't contain a users_controller.rb file. Back up and start over would be my best advice.

HTH, Bill

hey Bill,

My index page is still not getting displayed. Please have a look on the code. I am getting default page of Ruby server getting displayed. Pls help. I will appreciate that.

Thanks.

Attachments: http://www.ruby-forum.com/attachment/3415/testday3.zip