small medium large xlarge

26 Aug 2008, 01:00
Patrick Leahy (6 posts)

Hello folks: I need some help setting up SSL using SslRequirement in my Rails app. I dutifully followed the tutorial in the Third Edition that starts on page 628 (26.9 Use SSL to Transmit Sensitive Information) yet I was rewarded with this error on my ssl_required pages only: Failed to Connect, Firefox can’t establish a connection to the server at localhost.

I’ve spent a good few hours on Google and apparently the reason is this:

I am building a Rails app that requires some portions of the site to use HTTPS, so naturally I’m using the SSL requirement plugin. The plugin works great, but if you’re using Mongrel or WEBrick running out of script/server in your development environment, you now won’t be able to talk to those parts of your site (since these servers do not include SSL encryption).(Quote:

That website offers a fairly involved and I might add, not effective, solution that involves routing through some sort of concurrent Apache server because Apache supports https and Mongrel does not.

I’m running Mongrel for my apps. Thing is, I KNOW that someone before me has wanted to test https pages using Mongrel and probably did it…I just don’t know how. Any pointers would be greatly appreciated - I’m close to pulling my hair out about this one.

Cheers, Patrick

26 Aug 2008, 12:24
Sam Ruby (633 posts)

I haven’t seen any evidence that Mongrel directly supports SSL, meaning that some sort of routing through another server is required.

If that doesn’t work for you, an alternative you might want to explore is Passenger. I haven’t tried Passenger with SSL myself, but “this post”: indicates that it can be done. Those instructions specify RailsEnv “id”… you might want to try “development” or “production” instead.

26 Aug 2008, 22:18
Patrick Leahy (6 posts)

Sam how do you route through another server exactly? I know I need to use Apache on a “cluster of Mongrel servers” but I just don’t know how to do that. Everything I’ve read on Google seems to have this underlying assumption that I know how to do this - I’ve only been using Rails a month or two so I’m a bit stuck. Thanks mate.

26 Aug 2008, 22:41
Michael Mattingly (14 posts)

I don’t know much about this subject. Does this link help at all?

27 Aug 2008, 00:41
Patrick Leahy (6 posts)

Mike that guide looks almost perfect - until I read the little Linux disclaimer that warned against a Windows deployment. Thing is, I’m running and have been developing on Vista Home Premium. I really hope I don’t have to switch operating systems here just to get this bloody thing to work. I guess I’ll start with this: what OS are you (and anyone reading) running?

You must be logged in to comment