Nerian / bootstrap-wysihtml5-rails

WYSIWYG editor for Bootstrap, integrated in Rails assets pipeline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

http://localhost:3000/img/glyphicons-halflings.png 404 (Not Found)

semanticart opened this issue · comments

Hello,

I installed the gem using

gem 'bootstrap-wysihtml5-rails', :require => 'bootstrap-wysihtml5-rails', :git => 'git://github.com/Nerian/bootstrap-wysihtml5-rails.git'

I followed the other instructions as well.

I can do $('textarea').wysihtml5(); and everything works as expected except that the glyphicons-halflings.png is not found so some of the buttons are blank. It looks like the image isn't making it into the asset pipeline or maybe the path is wrong... I haven't dug into it too much yet.

Any thoughts?

Oh I didn't package the images. I will get to you in a couple of minutes.

Done. Try it and let me know if there any more issues.

Thanks!

Actually not done yet. The images are packaged but the css it pointing to a hard coded url, that is not the right one for the assets pipeline.

Take a look:

https://github.com/jhollingworth/bootstrap-wysihtml5/blob/master/lib/css/bootstrap.css#L1398

That is where you are not finding the images. Which is right, since that is not the path used by Rails pipeline. Nonetheless, this gem doesn't package bootstrap. You will need to have bootstrap installed. How are you getting bootstrap?

I use this one and the images work as expected:

https://github.com/anjlab/bootstrap-rails

Ah... I just downloaded the css and javascript I needed for bootstratp and threw it in vendor assets.

I tried the bootstrap-rails gem you mentioned but the path still doesn't resolve. I'm not sure how it would work, though. If the path isn't correct, how would the bootstrap-rails gem fix that? some sort of rewrite?

Did you remove the old Bootstrap files that you put in vendor?

Of course not :)

Removing those files makes it work as expected and the reasoning makes sense as well. Thanks for the help here. I don't think there's any action item except maybe mentioning the bootstrap-rails gem in the readme.

Great, happy coding 🐨

Done in 5db5e33 :)

hi,
I followed the instructions and installed both your gem and https://github.com/anjlab/bootstrap-rails. But I`m still getting "ActionController::RoutingError (No route matches [GET] "/img/glyphicons-halflings.png")" in my server logs.
Anything you could advise?
Thank you in advance.

Did you remove the old boostrap gem and its related require in the manifest file?
Did you reload the app?
Do you have *= require bootstrap in your css manifest?

Also, please open a new Issue.

What files remove??????