N
N
newbie3122015-07-17 16:41:30
Ruby on Rails
newbie312, 2015-07-17 16:41:30

Websocket-rails standalon production, what's wrong?

Hi all. I encountered such a problem that the current_user variable from gem devise is visible from the socket initialization script in development, but in production it returns an empty value. What is wrong?
production.rb

Rails.application.configure do
  config.assets.debug = true
  config.assets.digest = true
  config.assets.raise_runtime_errors = true


  config.cache_classes = true
  config.eager_load = true
  config.consider_all_requests_local       = false
  config.action_controller.perform_caching = true
  config.assets.js_compressor = Uglifier.new(mangle: false)
  config.assets.css_compressor = :sass
  config.assets.digest = true
  config.log_level = :debug
  config.action_mailer.default_url_options = { host: 'my_domain', port: 80 }

  config.action_mailer.raise_delivery_errors = false
  config.action_mailer.delivery_method = :sendmail
  config.middleware.delete Rack::Lock
  config.active_support.deprecation = :notify
  config.log_formatter = ::Logger::Formatter.new
  config.active_record.dump_schema_after_migration = false
end

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
newbie312, 2015-07-17
@newbie312

It was necessary to start websocket by specifying ENV:
rake websocket_rails:start_server RAILS_ENV=production

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question