Nerian / bootstrap-wysihtml5-rails

WYSIWYG editor for Bootstrap, integrated in Rails assets pipeline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File to import not found or unreadable: bootstrap-wysihtml5.

zolzaya opened this issue · comments

Hello guys,

I have a Rails 4rc1 application with multiple engines. I'm using this gem in my admin engine. According to documentation I added gem 'bootstrap-wysihtml5-rails' to admin engine's Gemfile. Then when I add @import 'bootstrap-wysihtml5' to admin engine's application.scss. I get below errors:

File to import not found or unreadable: bootstrap-wysihtml5.
Load paths:
  /home/zoloo/.rvm/gems/ruby-1.9.3-p429@rails-4rc1/gems/coffee-rails-4.0.0/lib/assets/javascripts
  /home/zoloo/.rvm/gems/ruby-1.9.3-p429@rails-4rc1/gems/font-awesome-sass-rails-3.0.2.2/app/assets/fonts
  /home/zoloo/.rvm/gems/ruby-1.9.3-p429@rails-4rc1/gems/font-awesome-sass-rails-3.0.2.2/app/assets/stylesheets
  /home/zoloo/.rvm/gems/ruby-1.9.3-p429@rails-4rc1/gems/bootstrap-sass-2.3.1.0/vendor/assets/images
  /home/zoloo/.rvm/gems/ruby-1.9.3-p429@rails-4rc1/gems/bootstrap-sass-2.3.1.0/vendor/assets/javascripts
  /home/zoloo/.rvm/gems/ruby-1.9.3-p429@rails-4rc1/gems/bootstrap-sass-2.3.1.0/vendor/assets/stylesheets

It seems like my application.scss can't find bootstrap-wysihtml5. But why? I don't have any idea :( By the way JavaScript is working fine. And here is the my environments:

Gems included by the bundle:
  * actionmailer (4.0.0.rc1)
  * actionpack (4.0.0.rc1)
  * activemodel (4.0.0.rc1)
  * activerecord (4.0.0.rc1)
  * activerecord-deprecated_finders (1.0.2)
  * activesupport (4.0.0.rc1)
  * addressable (2.3.4)
  * admin (0.0.1)
  * arel (4.0.0)
  * atomic (1.1.8)
  * bcrypt-ruby (3.0.1)
  * bootstrap-sass (2.3.1.0)
  * bootstrap-wysihtml5-rails (0.3.1.20)
  * builder (3.1.4)
  * bundler (1.3.5)
  * capybara (2.1.0)
  * carrierwave (0.8.0)
  * coffee-rails (4.0.0)
  * coffee-script (2.2.0)
  * coffee-script-source (1.6.2)
  * core (0.0.1)
  * diff-lcs (1.2.4)
  * erubis (2.7.0)
  * execjs (1.4.0)
  * factory_girl (4.2.0)
  * factory_girl_rails (4.2.1)
  * ffaker (1.16.1)
  * font-awesome-sass-rails (3.0.2.2)
  * hike (1.2.2)
  * i18n (0.6.4)
  * jquery-rails (2.2.1)
  * kaminari (0.14.1)
  * launchy (2.3.0)
  * letter_opener (1.1.1)
  * mail (2.5.3)
  * mime-types (1.23)
  * mini_magick (3.6.0)
  * minitest (4.7.3)
  * multi_json (1.7.2)
  * nokogiri (1.5.9)
  * pg (0.15.1)
  * polyglot (0.3.3)
  * rack (1.5.2)
  * rack-test (0.6.2)
  * rails (4.0.0.rc1)
  * railties (4.0.0.rc1)
  * rake (10.0.4)
  * rspec-core (2.13.1)
  * rspec-expectations (2.13.0)
  * rspec-mocks (2.13.1)
  * rspec-rails (2.13.2)
  * sass (3.2.8)
  * sass-rails (4.0.0.rc1)
  * shoulda-matchers (2.1.0)
  * simplecov (0.8.0.pre)
  * simplecov-html (0.7.1)
  * sprockets (2.9.3)
  * sprockets-rails (2.0.0.rc4)
  * state_machine (1.2.0)
  * subexec (0.2.3)
  * thor (0.18.1)
  * thread_safe (0.1.0)
  * tilt (1.3.7)
  * treetop (1.4.12)
  * tzinfo (0.3.37)
  * upsert (1.2.0)
  * warden (1.2.1)
  * xpath (2.0.0)

What if instead of include you do //= require bootstrap-wysihtml5in the manifest?

It doesn't appear that bootstrap-wysihtml5 is in the load path, according to that error.

I have got same result :(

Are you adding the gem to the Gemfile in the engine, or in the root app?

+1 same error here on Rails 4.0.0RC2. I'm adding the gem in an engine (and required bootstrap-wysihtml5-rails too)

i can confirm that //= require bootstrap-wysihtml5 works, but not @import 'bootstrap-wysihtml5'

If you could create a minimal code example to reproduce your error, that would be excellent.

The TestApp I use for this project is working fine, and it's using Rails 4:

https://github.com/Nerian/bootstrap-wysihtml5-rails/tree/master/testapp

Check it out and see what are the differences between it and your code. Let me know how it goes.

sass @import takes a filename to import.
bootstrap-wysihtml5.scss/sass/css doesn't exist

try with:

@import "bootstrap-wysihtml5/core";
@import "bootstrap-wysihtml5/wysiwyg-color";

@Recca Is right on the spot. Thanks.

@Recca 👍 worked for me too, Thank you ! 🐹

Does not works again?

application.sass:

@import 'bootstrap-wysihtml5/bootstrap3-wysihtml5.css'

application.js:

//= require bootstrap-wysihtml5/index

Right?

@Nerian
Sorry, my bad.
But it looks little strange... http://i.imgur.com/lYrhBVE.png

The latest version of the gem should be using a new fork: https://github.com/Waxolunist/bootstrap3-wysihtml5-bower

Maybe the way it is initialized changed.

There is a sample app https://github.com/Nerian/bootstrap-wysihtml5-rails/tree/master/testapp

Let me know how you fix it. It may be worth writting an upgrade note on the readme.

Everything well. I just had to include disabled:

//= require bootstrap/modal
@import 'bootstrap/glyphicons'

Sorry for bother.