Hello all, I am new to ruby on rails. I started to deploy a open source project into my website under a subdomain called ''scheduler''. But when I point to www.mydomain.com/scheduler/ I am getting my home page when i login through my home page I am getting page not found. This is due to when I hit login button the /controller/action is being pointed from the main domain i.e www.mydomain.com/controller/action instead of being www.mydomain.com/scheduler/controller/action Can anyone advise me how to change the domain in the links. Also all the images in the page are mislinked as there are referencing from the mydomain.com instead of scheduler. I deployed the app by copying the models, controllers, helpers, views and the neccesary files. Thanks for the support. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
From the paths you give, your using a subdirectory, not a subdomain. A subdomain would be scheduler.mydomain.com and would have to be set up in your DNS. It is is a separate app from the rest of the site, that is a good way to go. If you want to continue using a subdirectory, I think you''ll need to either edit routes.rb so the paths include "/scheduler". Or I think you could set the value of the RAILS_ROOT constant. Michael Slater www.BuildingWebApps.com www.LearningRails.com On Jan 10, 10:56 pm, stranger <strangersqu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello all, > > I am new to ruby on rails. I started to deploy a open source > project into my website under a subdomain called ''scheduler''. But when > I point towww.mydomain.com/scheduler/I am getting my home page when > i login through my home page I am getting page not found. > > This is due to when I hit login button the /controller/action is being > pointed from the main domain i.e > > www.mydomain.com/controller/action > > instead of beingwww.mydomain.com/scheduler/controller/action > > Can anyone advise me how to change the domain in the links. Also all > the images in the page are mislinked as there are referencing from the > mydomain.com instead of scheduler. > > I deployed the app by copying the models, controllers, helpers, views > and the neccesary files. > > Thanks for the support.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi Michael, Thanks a lot for the reply.. yes I have created a sub directory not a subdomain (sorry for that). Can you tell me how to edit the routes.rb to include the path (/scheduler)..or having a RAILS_ROOT constant.. Once again I appreciate your help. thank you On Jan 11, 9:22 am, Michael Slater <m...-04BUtanlfE1BDgjK7y7TUQ@public.gmane.org> wrote:> From the paths you give, your using a subdirectory, not a subdomain. A > subdomain would be scheduler.mydomain.com and would have to be set up > in your DNS. It is is a separate app from the rest of the site, that > is a good way to go. > > If you want to continue using a subdirectory, I think you''ll need to > either edit routes.rb so the paths include "/scheduler". Or I think > you could set the value of the RAILS_ROOT constant. > > Michael Slaterwww.BuildingWebApps.comwww.LearningRails.com > > On Jan 10, 10:56 pm, stranger <strangersqu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hello all, > > > I am new to ruby on rails. I started to deploy a open source > > project into my website under a subdomain called ''scheduler''. But when > > I point towww.mydomain.com/scheduler/Iam getting my home page when > > i login through my home page I am getting page not found. > > > This is due to when I hit login button the /controller/action is being > > pointed from the main domain i.e > > >www.mydomain.com/controller/action > > > instead of beingwww.mydomain.com/scheduler/controller/action > > > Can anyone advise me how to change the domain in the links. Also all > > the images in the page are mislinked as there are referencing from the > > mydomain.com instead of scheduler. > > > I deployed the app by copying the models, controllers, helpers, views > > and the neccesary files. > > > Thanks for the support.--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Save yourself a lot of trouble and just deploy to a subdomain. This is one of those opinions that Rails has that can really bite you in the butt. If you just simply can''t, I do have a plugin that will prepend all internally generated URLs (link_to, url_for, stylesheet_link_tag, javascript_link_tag, image_tag) stuff for you. It''s designed mainly for reverse proxying to Rails apps behind IIS, but it could work for you. i''d actually be interested to know if it does. See this post: http://www.napcsweb.com/blog/2007/12/18/reverse_proxy_fix-1041-released-with-rails-20-support/ On Jan 11, 2008 11:46 AM, stranger <strangersquest-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi Michael, > > Thanks a lot for the reply.. yes I have created a sub directory not a > subdomain (sorry for that). Can you tell me how to edit the routes.rb > to include the path (/scheduler)..or having a RAILS_ROOT constant.. > > Once again I appreciate your help. > > thank you > > On Jan 11, 9:22am, Michael Slater <m...-04BUtanlfE1BDgjK7y7TUQ@public.gmane.org> wrote: > > From the paths you give, your using a subdirectory, not a subdomain. A > > subdomain would be scheduler.mydomain.com and would have to be set up > > in your DNS. It is is a separate app from the rest of the site, that > > is a good way to go. > > > > If you want to continue using a subdirectory, I think you''ll need to > > either edit routes.rb so the paths include "/scheduler". Or I think > > you could set the value of the RAILS_ROOT constant. > > > > Michael Slaterwww.BuildingWebApps.comwww.LearningRails.com > > > > On Jan 10, 10:56 pm, stranger <strangersqu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hello all, > > > > > I am new to ruby on rails. I started to deploy a open source > > > project into my website under a subdomain called ''scheduler''. But when > > > I point towww.mydomain.com/scheduler/Iam getting my home page when > > > i login through my home page I am getting page not found. > > > > > This is due to when I hit login button the /controller/action is being > > > pointed from the main domain i.e > > > > >www.mydomain.com/controller/action > > > > > instead of beingwww.mydomain.com/scheduler/controller/action > > > > > Can anyone advise me how to change the domain in the links. Also all > > > the images in the page are mislinked as there are referencing from the > > > mydomain.com instead of scheduler. > > > > > I deployed the app by copying the models, controllers, helpers, views > > > and the neccesary files. > > > > > Thanks for the support. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hey Brian, Thanks a lot for the adive. I would certainly deploy my app using the sub domain. Anyway thanks for the plugin. I will try it when I am on IIS. Do you have any open source projects (APPS) designed using rails. I want to look at the source code and learn Rails in much more practical approach.. Thanks once again. On Jan 11, 11:47 am, "Brian Hogan" <bpho...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Save yourself a lot of trouble and just deploy to a subdomain. This is one > of those opinions that Rails has that can really bite you in the butt. > > If you just simply can''t, I do have a plugin that will prepend all > internally generated URLs (link_to, url_for, stylesheet_link_tag, > javascript_link_tag, image_tag) stuff for you. It''s designed mainly for > reverse proxying to Rails apps behind IIS, but it could work for you. i''d > actually be interested to know if it does. > > See this post:http://www.napcsweb.com/blog/2007/12/18/reverse_proxy_fix-1041-releas... > > On Jan 11, 2008 11:46 AM, stranger <strangersqu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi Michael, > > > Thanks a lot for the reply.. yes I have created a sub directory not a > > subdomain (sorry for that). Can you tell me how to edit the routes.rb > > to include the path (/scheduler)..or having a RAILS_ROOT constant.. > > > Once again I appreciate your help. > > > thank you > > > On Jan 11, 9:22am, Michael Slater <m...-04BUtanlfE1BDgjK7y7TUQ@public.gmane.org> wrote: > > > From the paths you give, your using a subdirectory, not a subdomain. A > > > subdomain would be scheduler.mydomain.com and would have to be set up > > > in your DNS. It is is a separate app from the rest of the site, that > > > is a good way to go. > > > > If you want to continue using a subdirectory, I think you''ll need to > > > either edit routes.rb so the paths include "/scheduler". Or I think > > > you could set the value of the RAILS_ROOT constant. > > > > Michael Slaterwww.BuildingWebApps.comwww.LearningRails.com > > > > On Jan 10, 10:56 pm, stranger <strangersqu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hello all, > > > > > I am new to ruby on rails. I started to deploy a open source > > > > project into my website under a subdomain called ''scheduler''. But when > > > > I point towww.mydomain.com/scheduler/Iamgetting my home page when > > > > i login through my home page I am getting page not found. > > > > > This is due to when I hit login button the /controller/action is being > > > > pointed from the main domain i.e > > > > >www.mydomain.com/controller/action > > > > > instead of beingwww.mydomain.com/scheduler/controller/action > > > > > Can anyone advise me how to change the domain in the links. Also all > > > > the images in the page are mislinked as there are referencing from the > > > > mydomain.com instead of scheduler. > > > > > I deployed the app by copying the models, controllers, helpers, views > > > > and the neccesary files. > > > > > Thanks for the support.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---