Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket class override fails in production #434

Open
Bijendra opened this issue Oct 19, 2016 · 0 comments
Open

Websocket class override fails in production #434

Bijendra opened this issue Oct 19, 2016 · 0 comments

Comments

@Bijendra
Copy link

Bijendra commented Oct 19, 2016

I have to patch the below code in the gem,

app/controllers/websocket_rails/delegation_controller.rb

 module WebsocketRails
    class DelegationController < ApplicationController
    end
 end

Current project structure is like

  Project folder
      |_namespace1-/app/../application_controller.rb
      |_namespace2-/app/../application_controller.rb

So i have to override the default access in delegation_controller.rb.

  Project folder
     |_config/initializers/websocket_patch.rb

  module WebsocketRails
    class DelegationController < Namespace1::ApplicationController
    end
  end

This works properly in development environment but breaks in production. There is not specific configuration to load the initializers in production enviroment.

websocket-rails-0.7.0/lib/rails/app/controllers/websocket_rails/delegation_controller.rb:11:in 
`<module:WebsocketRails>': uninitialized constant WebsocketRails::ApplicationController (NameError)

I have tried multiple options to load forcefully but no luck. It still goes to the gem file path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant