I've been trying to configure webrick to use SSL on all pages of my application.
gem 'rack-ssl', :require => 'rack/ssl'
to my gem file and
config.middleware.insert_before ActionDispatch::Static, "Rack::SSL"
config.force_ssl = true
to my /config/application.rb file. And I configured webrick to use my self signed certificate by modifying my /script/rails file to looke like so
class Server < ::Rack::Server
:Port => 3001,
:environment => (ENV['RAILS_ENV'] || "development").dup,
:daemonize => false,
:debugger => false,
#:pid => File.expand_path("tmp/pids/server.pid"),
:config => File.expand_path("config.ru"),
:SSLEnable => true,
:SSLVerifyClient => OpenSSL::SSL::VERIFY_PEER,
:SSLPrivateKey => OpenSSL::PKey::RSA.new( File.open("home/sureweb/rubystuff/server.cert.key").read),
:SSLCertificate => OpenSSL::X509::Certificate.new(File.open("home/sureweb/rubystuff/server.cert.crt").read),
:SSLCACertificateFile => 'home/sureweb/rubystuff/server.crt',
:SSLCertName => [["CN", WEBrick::Utils::getservername]]
APP_PATH = File.expand_path('../../config/application', __FILE__)
require File.expand_path('../../config/boot', __FILE__)
But every time I run rails s I get a message saying
You have already activated activesupport 3.2.3, but your Gemfile requires activesupport 3.0.12. Using bundle exec may solve this. (Gem::LoadError)
Normally I could solve this by removing the version 3.2.3 but I have numerous other gems that depend on it so that is not an option. Is there another way to get this working?