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

Using without require "sprockets/railtie" #257

Closed
AxelKhaldeev opened this issue Apr 22, 2020 · 10 comments
Closed

Using without require "sprockets/railtie" #257

AxelKhaldeev opened this issue Apr 22, 2020 · 10 comments

Comments

@AxelKhaldeev
Copy link

AxelKhaldeev commented Apr 22, 2020

Is it possible to use without # require "sprockets/railtie" in application.rb?

@bogdan
Copy link
Collaborator

bogdan commented Apr 24, 2020

You can use a low level method JsRoutes.generate.

Some examples here: https://github.com/railsware/js-routes#very-advanced-setup

@AxelKhaldeev
Copy link
Author

Thank you for the answer. It works, but if I comment require sprockets in application.rb I have error on dev server starting.

@bogdan
Copy link
Collaborator

bogdan commented Apr 27, 2020

Please provide that error.

@seniath
Copy link

seniath commented May 4, 2020

Thank you for the answer. It works, but if I comment require sprockets in application.rb I have error on dev server starting.

is it, by any chance

1: from ~/.gem/ruby/2.6.2/gems/js-routes-1.3.3/lib/js_routes/engine.rb:64:in `block in <class:Engine>'
~/.gem/ruby/2.6.2/gems/railties-5.2.4.2/lib/rails/railtie/configuration.rb:97:in `method_missing': undefined method `assets' for #<Rails::Application::Configuration:0x00007fa77554fac8> (NoMethodError)
Did you mean?  asset_host

@AxelKhaldeev
Copy link
Author

@seniath Yes, this one.

@bogdan
Copy link
Collaborator

bogdan commented May 5, 2020

I've applied a patch to master. Please check if it works for you and I'll make a release.

@AxelKhaldeev
Copy link
Author

AxelKhaldeev commented May 5, 2020 via email

@bogdan
Copy link
Collaborator

bogdan commented May 6, 2020

Released 1.4.10

@roooodcastro
Copy link

Released 1.4.10

Can't find the version 1.4.10 in Rubygems, so bundle update isn't working to update the gem. Was that version pulled? https://rubygems.org/gems/js-routes

@bogdan
Copy link
Collaborator

bogdan commented Nov 17, 2020

@roooodcastro sorry, I am not sure how did it happen. I made a 1.4.11 release.

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

4 participants