The application I''m working on has two user controllers. One is the main page a user reaches when after login /user/index.html and the other is a user administration page located at /admin/user/index.html. When deploying into production I can not reach the admin page, Rails always render the regular user page even though the browser URL says / admin/user/index.html? Anybody know what could be wrong, I haven''t made any changes to routes.rb and I''ve only added a admin/user folder to controllers and views. Kind regards, Roland --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Why are you using .html at the end of you URIs? I don''t know if that would solve anything but I can''t imagine why you''d need to do that. RSL On 4/4/07, Roland Bali <roland.bali-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > The application I''m working on has two user controllers. One is the > main page a user reaches when after login /user/index.html and the > other is a user administration page located at /admin/user/index.html. > > When deploying into production I can not reach the admin page, Rails > always render the regular user page even though the browser URL says / > admin/user/index.html? > > Anybody know what could be wrong, I haven''t made any changes to > routes.rb and I''ve only added a admin/user folder to controllers and > views. > > Kind regards, > Roland > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You''re correct, sorry about that the URL:s are /user and /admin/user. They both render files named index.rhtml in views/user and views/admin/ user. As I understand this kind of routing, using subfolders, should work or would I have to rename /admin/user to something else?! Kind regards, Roland On Apr 4, 3:51 pm, "Russell Norris" <r...-ftMzyaTR+bHNyFkoKTPOtdi2O/JbrIOy@public.gmane.org> wrote:> Why are you using .html at the end of you URIs? I don''t know if that would > solve anything but I can''t imagine why you''d need to do that. > > RSL > > On 4/4/07, Roland Bali <roland.b...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > The application I''m working on has two user controllers. One is the > > main page a user reaches when after login /user/index.html and the > > other is a user administration page located at /admin/user/index.html. > > > When deploying into production I can not reach the admin page, Rails > > always render the regular user page even though the browser URL says / > > admin/user/index.html? > > > Anybody know what could be wrong, I haven''t made any changes to > > routes.rb and I''ve only added a admin/user folder to controllers and > > views. > > > Kind regards, > > Roland--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
They should work as you''ve described. You say they do actually work that way on your desktop? If you''ve written some functional tests you might try running them on the server as well. assert_template would clear the whole matter up, sounds like. RSL On 4/4/07, Roland Bali <roland.bali-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > You''re correct, sorry about that the URL:s are /user and /admin/user. > They both render files named index.rhtml in views/user and views/admin/ > user. > > As I understand this kind of routing, using subfolders, should work or > would I have to rename /admin/user to something else?! > > Kind regards, > Roland > > > On Apr 4, 3:51 pm, "Russell Norris" <r...-ftMzyaTR+bHNyFkoKTPOtdi2O/JbrIOy@public.gmane.org> wrote: > > Why are you using .html at the end of you URIs? I don''t know if that > would > > solve anything but I can''t imagine why you''d need to do that. > > > > RSL > > > > On 4/4/07, Roland Bali <roland.b...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > The application I''m working on has two user controllers. One is the > > > main page a user reaches when after login /user/index.html and the > > > other is a user administration page located at /admin/user/index.html. > > > > > When deploying into production I can not reach the admin page, Rails > > > always render the regular user page even though the browser URL says / > > > admin/user/index.html? > > > > > Anybody know what could be wrong, I haven''t made any changes to > > > routes.rb and I''ve only added a admin/user folder to controllers and > > > views. > > > > > Kind regards, > > > Roland > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yes it works in development but when I deploy in production it doesn''t. I''m using WEBrick when developing and Mongrel in production but that shouldn''t be a problem as I understand since the routing is in Rails and not in the server. The weird thing is that it works if I access the /admin/user URL _before_ /user after startup. But if I go to /user first after startup I can never reach /admin/user without a restart. I haven''t tried the functional test thing, I''ll have to look in to that, haven''t written tests before. /Roland On Apr 4, 11:00 pm, "Russell Norris" <r...-ftMzyaTR+bHNyFkoKTPOtdi2O/JbrIOy@public.gmane.org> wrote:> They should work as you''ve described. You say they do actually work that way > on your desktop? If you''ve written some functional tests you might try > running them on the server as well. assert_template would clear the whole > matter up, sounds like. > > RSL > > On 4/4/07, Roland Bali <roland.b...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > You''re correct, sorry about that the URL:s are /user and /admin/user. > > They both render files named index.rhtml in views/user and views/admin/ > > user. > > > As I understand this kind of routing, using subfolders, should work or > > would I have to rename /admin/user to something else?! > > > Kind regards, > > Roland > > > On Apr 4, 3:51 pm, "Russell Norris" <r...-ftMzyaTR+bHNyFkoKTPOtdi2O/JbrIOy@public.gmane.org> wrote: > > > Why are you using .html at the end of you URIs? I don''t know if that > > would > > > solve anything but I can''t imagine why you''d need to do that. > > > > RSL > > > > On 4/4/07, Roland Bali <roland.b...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > The application I''m working on has two user controllers. One is the > > > > main page a user reaches when after login /user/index.html and the > > > > other is a user administration page located at /admin/user/index.html. > > > > > When deploying into production I can not reach the admin page, Rails > > > > always render the regular user page even though the browser URL says / > > > > admin/user/index.html? > > > > > Anybody know what could be wrong, I haven''t made any changes to > > > > routes.rb and I''ve only added a admin/user folder to controllers and > > > > views. > > > > > Kind regards, > > > > Roland--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---