acatejr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Nov-13 18:59 UTC
Detect Application Server
I am working on a ruby app where the user fills out a form that gets sent via email. Sometimes I work on the app at my computer at home and other times at work. I need to setup the development environment so that the app detects which server it is currently running on and uses the appropriate smtp host. I am relatively new to Ruby on Rails, so am not sure of the best way to do this. Thanks for any help. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 11/13/06, acatejr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <acatejr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I am working on a ruby app where the user fills out a form that gets > sent via email. Sometimes I work on the app at my computer at home and > other times at work. I need to setup the development environment so > that the app detects which server it is currently running on and uses > the appropriate smtp host. I am relatively new to Ruby on Rails, so am > not sure of the best way to do this. Thanks for any help. > > > > >I would probably keep it simple and just check the hostname of the machine by making a system call in development.rb `hostname` # => ''dev_box1'' Hope this helps. -- Zack Chandler http://depixelate.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 -~----------~----~----~----~------~----~------~--~---
Or you could have 2 environements, development_home, and development office, with the majority of settings being common, but with different smtp stuff. Fred -- Posted via http://www.ruby-forum.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 -~----------~----~----~----~------~----~------~--~---
acatejr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Nov-13 19:25 UTC
Re: Detect Application Server
Thanks, and I am familiar withe development.rb file, but am not sure how I would implement your suggestion. Thanks again. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
acatejr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Nov-13 19:26 UTC
Re: Detect Application Server
Thanks. That makes sense!!! Duh, how did I miss that idea. Thanks again!! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---