I''ve recently modified a site to use SSL for some of the pages, and I have it working on the production box. However, in my development environment, I''m using RadRails on Windows, which provides a Mongrel server for development. Since this setup doesn''t support SSL, I can no longer exercise the site fully in my development environment. Is there a way to support SSL within the RadRails/Mongrel environment? I don''t think it uses Apache at all. I could set up an Apache+Mongrel setup on my dev box to mirror the production box setup... is that the way to go? (I was hoping to avoid that extra complexity, but maybe I should stop resisting...) thank, Michael Slater www.mslater.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 -~----------~----~----~----~------~----~------~--~---
I have SSL enabled for production mode, but disabled in development/
test modes.
# in application.rb
# Force https usage for all links and redirects
# Only do this in production mode, though, because localhost
# probably doesn''t have SSL enabled
if %w(production demo).include?(ENV[''RAILS_ENV''])
def default_url_options(options)
{ :protocol => ''https://'' }
end
end
Does this help?
-- Wes
On Mar 12, 3:08 pm, "Michael Slater"
<m...-04BUtanlfE1BDgjK7y7TUQ@public.gmane.org>
wrote:> I''ve recently modified a site to use SSL for some of the pages,
and I
> have it working on the production box. However, in my development
> environment, I''m using RadRails on Windows, which provides a
Mongrel
> server for development. Since this setup doesn''t support SSL, I
can no
> longer exercise the site fully in my development environment.
>
> Is there a way to support SSL within the RadRails/Mongrel environment?
> I don''t think it uses Apache at all.
>
> I could set up an Apache+Mongrel setup on my dev box to mirror the
> production box setup... is that the way to go? (I was hoping to avoid
> that extra complexity, but maybe I should stop resisting...)
>
> thank,
>
> Michael Slaterwww.mslater.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
-~----------~----~----~----~------~----~------~--~---
Hi Wes, wesgarrison wrote:> # in application.rb > > # Force https usage for all links and redirects > # Only do this in production mode, though, because localhost > # probably doesn''t have SSL enabled > if %w(production demo).include?(ENV[''RAILS_ENV'']) > def default_url_options(options) > { :protocol => ''https://'' } > end > end > > Does this help?I meant to get back to you sooner and thank you for this after you suggested it last week. It was exactly what I needed. There''s another approach that was suggested on the deploy list but it involved changes both in the app and on the server. I like this better since it puts everything in the app and I could also extend it to conditionally apply to specific controller / actions. Thanks much. It really helped me. Best regards, Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---