ArgumentError in HomeController#index

Hey guys, I’m new to ruby/rails and trying to sort something…

I just created an app with composer,
http://railsapps.github.com/rails-composer/

I used the command:

rails new myapp -m
https://raw.github.com/RailsApps/rails-composer/master/composer.rb

I set up the rails server, and tried to load the app on localhost:3000

However, I end up with:

ArgumentError in HomeController#index

Need a handler. Supply an options hash that has a :with key as the last
argument.

I’m not sure what to do here, any help or pointing me in the right
direction is greatly appreciated.

On 28 August 2012 19:20, Travis Mc [email protected] wrote:

I set up the rails server, and tried to load the app on localhost:3000

However, I end up with:

ArgumentError in HomeController#index

Need a handler. Supply an options hash that has a :with key as the last
argument.

Copy and paste the full error here along with the section of code
causing the problem (presumably the index method in this case) and
tell us which line the error refers to. First however look carefully
at the error message and the line of code and try to work out what the
problem is. The clue is usually in the message though it can
sometimes take a bit of digging out.

Colin

Travis Mc wrote in post #1073628:

Hey guys, I’m new to ruby/rails and trying to sort something…

I just created an app with composer,
http://railsapps.github.com/rails-composer/

I used the command:

rails new myapp -m
https://raw.github.com/RailsApps/rails-composer/master/composer.rb

I set up the rails server, and tried to load the app on localhost:3000

However, I end up with:

ArgumentError in HomeController#index

Need a handler. Supply an options hash that has a :with key as the last
argument.

I’m not sure what to do here, any help or pointing me in the right
direction is greatly appreciated.

I just got this error as well, and it can be fixed by removing
“protect_from_forgery” in /app/controllers/application_controller. I’m
very new to ROR so I’m not sure what the implications will be for doing
this though…

Okay, better yet, just place the 2 on separate lines. So in your
application_controller it should look like:


protect_from_forgery
rescue_from CanCan::AccessDenied do |exception|

Steven B. wrote in post #1073700:

Okay, better yet, just place the 2 on separate lines. So in your
application_controller it should look like:


protect_from_forgery
rescue_from CanCan::AccessDenied do |exception|

Thankyou for this!!!

I don’t know what’s going on here, but I’ve been fighting with this for
the past 4 hours. If you have any other tips on things like this that
got you hung up I’m all ears as new to ruby as well.

For what its worth, another little bug that I seemed to run to a lot hd
to do with the openSSL certificates fail error in railsinstaller for
windows, see:
http://railsapps.github.com/openssl-certificate-verify-failed.html

I have since switched to ubuntu because I was told that I’ll continue to
have small issues like this in windows that can inhibit learning…

But again, thank you so much for the help.