Forum: Ruby on Rails Routing error

469d5f3ba5c4680ae4e8be250a7ed2ee?d=identicon&s=25 trekr67 (Guest)
on 2013-07-22 23:23
(Received via mailing list)
Hi,

I'm a newbie Ruby on Rails developer and have across the following
problem:

I've put an image on a page and want to be taken to twitter to be
authenticated, when the image is clicked however I get the following
error
when I do:

ActionController::Routing error (No route matches [GET] "auth/twitter"

I've registered my app on the Twitter dev site and have installed
Ominiauth
and Omniauth-Twitter gems. I've also added my Consumer keys and Consumer
secret keys (for Twitter) to the relevant files.

This is the code around my image:-

=link_to image_tag("twitter.png", :size => "32x32"), "auth/twitter", :id
=>
'twitter image'

Can anyone help please as I'm pulling my hair out in frustration!
Aa082c8b00a50928e5860dcd70bf2368?d=identicon&s=25 tamouse m. (tamouse_m)
on 2013-07-23 05:53
(Received via mailing list)
On Jul 21, 2013, at 6:06 AM, trekr67 <cebirim@gmail.com> wrote:

> This is the code around my image:-
>
> =link_to image_tag("twitter.png", :size => "32x32"), "auth/twitter", :id =>
'twitter image'
>
> Can anyone help please as I'm pulling my hair out in frustration!

First thing you should do is run:

$ rake routes

and see if there is a route for auth/twitter.

If there is not, add one in config/routes.rb for that route.

Read http://guides.rubyonrails.org/routing.html thoroughly.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.