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

Gem in an engine #19

Open
Svashta opened this issue Mar 16, 2015 · 3 comments
Open

Gem in an engine #19

Svashta opened this issue Mar 16, 2015 · 3 comments

Comments

@Svashta
Copy link

Svashta commented Mar 16, 2015

Hi,

i am trying to use this gem inside an egine in my application.
How can i use it as it seems it is always searching inside root app paths, not my engine paths.

Is there any way to tell where it starts searching from?

@Svashta
Copy link
Author

Svashta commented Mar 17, 2015

I've managed to change prefix_path via custom initializer, which is OK, but styles and javascripts are not loaded as expected. If i look at themes_on_rails_example and how the stylesheet_link_tag is generated it is a little bit different.
In examples it goes to /assets/theme/all
In my case it is /stylesheets/theme/all - which can't be found.

Any ideas?

@Svashta
Copy link
Author

Svashta commented Mar 17, 2015

Figured out the problem is in engine.rb initializers which also have paths defined.
I am now currently overriding them in my engine, but feels fugly.
Is there a more elegant way to do it?
Maybe to extend the gem to allow passing in an option for default path?

@Svashta
Copy link
Author

Svashta commented Apr 3, 2015

Adding additional engine complicates things even more.
Paths in gem are partially hardcoded which makes stuff non usable.

I have tried to overwrite paths in second engine, too, but either first engine or second engine paths work. The funny thing is i can see paths in views search on error, but something goes wrong non the less.

I would really appreaciate some tips on how i could use the gem with mountable engines and modular way.

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