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

JsRoutes not reading initializer file on heroku #102

Closed
alex88 opened this issue Apr 1, 2014 · 1 comment
Closed

JsRoutes not reading initializer file on heroku #102

alex88 opened this issue Apr 1, 2014 · 1 comment

Comments

@alex88
Copy link

alex88 commented Apr 1, 2014

Hi, since rails 4 has removed the initialize_on_precompile is there to load the custom initializer on assets:precompile running during heroku deployment?

The routes it generates doesn't have the settings I've set and I think it's because the initializer isn't loaded.

@alex88
Copy link
Author

alex88 commented Apr 1, 2014

I've solved this by adding in engine.rb inside the initializer

      app_initializer = Rails.root.join('config', 'initializers', 'jsroutes.rb').to_s
      if File.exists?( app_initializer )
        load app_initializer
      end

in this way the file gets loaded correctly.

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

Successfully merging a pull request may close this issue.

1 participant