production environment - Rails redirects to https on localhost, don't know why -
in development environment fine.
but when start rails s --environment=production
i this:
=> booting webrick => rails 3.2.18 application starting in production on http://0.0.0.0:3000 => phone call -d detach => ctrl-c shutdown server [2014-06-18 23:09:16] info webrick 1.3.1 [2014-06-18 23:09:16] info ruby 1.9.3 (2013-11-22) [x86_64-linux] [2014-06-18 23:09:16] info webrick::httpserver#start: pid=6649 port=3000 and server appears working.
but when go localhost:3000 changes https:localhost , browser shows unable connect.
in production.log there no error.
thanks!
edit: after searching ssl grep get:
./app/controllers/import_controller.rb: http.use_ssl = true ./app/models/user_contact.rb: http.use_ssl = true ./app/views/layouts/better_iceland.html.haml: ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; ./app/views/layouts/yrpri_front.html.haml: ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; ./app/views/layouts/estartup.html.haml: ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; ./app/views/shared/_analytics.html.haml: ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; ./config/environments/production.rb~:# method = request.ssl? ? "https" : "http" ./config/environments/production.rb~: config.force_ssl = true ./config/environments/production.rb:# method = request.ssl? ? "https" : "http" ./config/environments/production.rb: config.force_ssl = true ./config/newrelic.yml: ssl: false ./config/application.rb: # config.plugins = [ :exception_notification, :ssl_requirement, :all ] ./config/locales/sv-se.yml: d7c8c85bf79bbe1b7188497c32c3b0ca: misslyckades ./agpl-3.0.txt: may not propagate or modify covered work except expressly ./gemfile.lock: rack-ssl (1.3.4) ./gemfile.lock: rack-ssl (~> 1.3.2) ./lib/contacts/contacts/windows_live.rb: http.use_ssl = true i changed in production.rb config.force_ssl = true false still gets redirected (i restarted server).
do have next set in config?
# config/application.rb module myapp class application < rails::application config.force_ssl = true end end ruby-on-rails production-environment
No comments:
Post a Comment