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

jstree style sheets are not included in assets #5

Open
MobilUser opened this issue Feb 20, 2012 · 9 comments
Open

jstree style sheets are not included in assets #5

MobilUser opened this issue Feb 20, 2012 · 9 comments

Comments

@MobilUser
Copy link

I have the issue that the jstree own CSS files are not included in the asset directory. The individual images of the various themes are under assets/jstree-themes, but the CSS files such as style.css is missing.
Is this a config issue on my side?

Txs for any response

@huug
Copy link

huug commented Jun 19, 2012

I have the same issue on my remote test-sever.

@MobilUser
Copy link
Author

As a workaround I let nginx serve the missing style.css file directly. Couldn't figure out any other solution.

@huug
Copy link

huug commented Jun 20, 2012

Because my Rails app is not served on the root-uri but on a sub-uri, I removed the first '/' slash in the path:

$.jstree._themes = 'assets/jstree-themes/';

That solved it.

@MobilUser
Copy link
Author

Where did you put that statement in?

@huug
Copy link

huug commented Jun 21, 2012

@yuri-zubov
Copy link

try write only
config/application.rb

config.assets.precompile += %w(jstree-themes/**/*)

it work in rails 3.2

@gregsaunderson
Copy link

I can confirm that editing your config/application.rb as I0Result stated above solved this same problem for me

@npearson72
Copy link

I'm having a similar issue. None of the suggestions worked for me. I'm on Rails 4.1.4

I'm getting:

Failed to load resource: the server responded with a status of 404 (Not Found) http://bluebirdcart.com/assets/jstree-themes/default/style.css

Any ideas?

@brendon
Copy link

brendon commented Nov 9, 2014

I think in Rails 4, the assets are always precompiled with the cache busting string incorporated into the file name. So you can no longer reference assets without using the the helpers to generate the URL (e.g. asset_path(). The solution would be to use ERB to generate this path in the default config in the JS file.

Also, the author of this gem hasn't updated it for a while. The latest version of jstree is 3.0.8 by the looks of things. It might be better to just integrate it yourself under /vendor/assets.

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

6 participants