Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
RoutingError
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
hopewise  
View profile  
 More options Apr 21 2012, 12:47 pm
From: hopewise <as3...@gmail.com>
Date: Sat, 21 Apr 2012 09:47:27 -0700 (PDT)
Local: Sat, Apr 21 2012 12:47 pm
Subject: RoutingError

I have deployed my rails app to heroku, then, I got an error:

    The page you were looking for doesn't exist.

    You may have mistyped the address or the page may have moved.

but, it works perfect locally at development mode, it seems there is
configuration error between `devise` and `routing-filter` gem

if I visit: `http://dcaclab.herokuapp.com`
my app will routed to:  `http://dcaclab.herokuapp.com/en/users/sign_in`

so, why devise worked fine with routing-filter in development mode, but not
in production ?
any idea please ?

The home controller:

class HomeController < ApplicationController

  def welcome
  end

  def set_lang
    locale = params[:id]
    I18n.locale = locale
    raise 'unsupported locale' unless ['ar', 'en' ].include?(locale)
    redirect_to :back
  end
end

Here is my routes.rb:

    devise_for :users

      resources :experiments
      Rails.application.routes.draw do
        filter :locale, :pagination, :uuid
      end

      match 'lang' => 'home#set_lang'

      root :to => 'home#welcome'

    2012-04-21T13:01:31+00:00 app[web.1]: Started GET "/en/users/sign_in"
for 94.249.67.204 at 2012-04-21 13:01:31 +0000
    2012-04-21T13:01:31+00:00 app[web.1]: ActionController::RoutingError
(No route matches {:controller=>"devise/home", :action=>"set_lang",
:id=>"ar"}):
    2012-04-21T13:01:31+00:00 app[web.1]:
    2012-04-21T13:01:31+00:00 app[web.1]:   Parameters: {"locale"=>"en"}
    2012-04-21T13:01:31+00:00 app[web.1]: Processing by
Devise::SessionsController#new as HTML
    2012-04-21T13:01:31+00:00 app[web.1]:   Rendered
vendor/bundle/ruby/1.9.1/gems/devise-2.0.4/app/views/devise/_links.erb
(0.4ms)
    2012-04-21T13:01:31+00:00 app[web.1]:  
app/views/layouts/application.html.haml:17:in
`_app_views_layouts_application_html_haml___1664922202454615355_30206680'
    2012-04-21T13:01:31+00:00 app[web.1]:
    2012-04-21T13:01:31+00:00 app[web.1]:
    2012-04-21T13:01:31+00:00 app[web.1]: Completed 500 Internal Server
Error in 6ms
    2012-04-21T13:01:31+00:00 app[web.1]:   Rendered
vendor/bundle/ruby/1.9.1/gems/devise-2.0.4/app/views/devise/sessions/new.ht ml.erb
within layouts/application (3.2ms)
    2012-04-21T13:01:31+00:00 heroku[router]: GET
dcaclab.herokuapp.com/en/users/sign_in dyno=web.1 queue=0 wait=0ms
service=14ms status=404 bytes=728


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Carlos Antonio da Silva  
View profile  
 More options Apr 22 2012, 9:23 am
From: Carlos Antonio da Silva <carlosantoniodasi...@gmail.com>
Date: Sun, 22 Apr 2012 10:23:07 -0300
Local: Sun, Apr 22 2012 9:23 am
Subject: Re: [devise] RoutingError

I have no idea what this routing-filter gem does, and why you're calling routes.draw again inside the routes.

Anyway, does devise/home exists? How's your sign in template? I wonder if there's a link using hash format or something like that in you view. If not, it may be an issue with routing-filter.

--
At.
Carlos Antonio


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Samir Sabri  
View profile  
 More options Apr 23 2012, 3:18 am
From: Samir Sabri <as3...@gmail.com>
Date: Mon, 23 Apr 2012 10:18:27 +0300
Local: Mon, Apr 23 2012 3:18 am
Subject: Re: [devise] RoutingError

Thanks I have solved the problem, its a scope issue, I have to add "/home"
as the controller in the link_to helper rather than "home"

Thanks again!

On Sun, Apr 22, 2012 at 4:23 PM, Carlos Antonio da Silva <

--
--
Kind Regards,
---------------------------------------------
Samir Sabri
Software Architect& Developer
www.dcaclab.com
Jordan-Middle East

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »