I''d like to serve a particular rails app at <my ip address>/test and my webserver is serving up the app when I visit that URI but as suspected, rails looks for a controller or method called "test" and I get the following error message: No route matches "/test" with {:method=>:get} Can someone tell me what config change I need to make? I thought it might be the following line in config/environment.rb but I can''t get it to work by editing it. config.load_paths += %W( {RAILS_ROOT}/extras ) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
James Moore
2007-Dec-12 00:37 UTC
Re: how can I run rails at a URI containing a folder path?
On Dec 11, 2007 10:19 AM, eggman2001 <sodani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''d like to serve a particular rails app at <my ip address>/test and > my webserver is serving up the app when I visit that URI but as > suspected, rails looks for a controller or method called "test" and I > get the following error message: > No route matches "/test" with {:method=>:get} > > Can someone tell me what config change I need to make? I thought it > might be the following line in config/environment.rb but I can''t get > it to work by editing it. > config.load_paths += %W( {RAILS_ROOT}/extras )Sounds like you''re looking for relative_url_root: http://railsmanual.org/class/ActionController%3A%3AAbstractRequest/relative_url_root -- James Moore | james-7AXNjMB9LsNl57MIdRCFDg@public.gmane.org Ruby and Ruby on Rails consulting blog.restphone.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
eggman2001
2007-Dec-19 16:34 UTC
Re: how can I run rails at a URI containing a folder path?
Thank you On Dec 11, 7:37 pm, "James Moore" <jamesthepi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Dec 11, 2007 10:19 AM, eggman2001 <sod...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I''d like to serve a particular rails app at <my ip address>/test and > > my webserver is serving up the app when I visit that URI but as > > suspected, rails looks for a controller or method called "test" and I > > get the following error message: > > No route matches "/test" with {:method=>:get} > > > Can someone tell me what config change I need to make? I thought it > > might be the following line in config/environment.rb but I can''t get > > it to work by editing it. > > config.load_paths += %W( {RAILS_ROOT}/extras ) > > Sounds like you''re looking for relative_url_root: > > http://railsmanual.org/class/ActionController%3A%3AAbstractRequest/re... > > -- > James Moore | ja...-7AXNjMB9LsNl57MIdRCFDg@public.gmane.org > Ruby and Ruby on Rails consulting > blog.restphone.com--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---