ruby on rails - bootstrap-sass not working when running rspec -


i don't think i'm understanding how rails asset pipeline works. i'm building rails engine has dependency on bootstrap-sass in gemspec:

#--------# # assets # #--------#  ## https://github.com/twbs/bootstrap-sass s.add_development_dependency 'bootstrap-sass', '~> 3.1.1.1'  ## https://github.com/rails/coffee-rails s.add_development_dependency 'coffee-rails', '~> 4.0.1'  ## https://github.com/compass/compass-rails s.add_development_dependency 'compass-rails', '~> 1.1.7'  ## https://github.com/rails/sass-rails s.add_development_dependency 'sass-rails', '~> 4.0.3'  ## https://github.com/rails/coffee-rails s.add_development_dependency 'uglifier', '>= 1.3.0' 

in application.css, file i've got.

/*  *= require bootstrap  *= require_tree .  */ 

when run rails s, bootstrap loaded inside application.css, when run specs, get:

 actionview::template::error:    couldn't find file 'bootstrap'      (in /users/typeoneerror/new_app/engines/app_core/app/assets/stylesheets/app_core/application.css:2) 

why work when running development cannot find asset when running test?

2 things can think of:

either missing engine declaration, creating app_core/lib/app_core/engine.rb file following content

module appcore # adapt real environment   class engine < ::rails::engine   end end 

either need remove add_development_dependency calls , add them gems in gemfile


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -