I don't think I'm understanding how the Rails asset pipeline works. I'm building a rails engine that has a dependency on bootstrap-sass in its 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 my application.css, file I've got.
/*
*= require bootstrap
*= require_tree .
*/
When I run rails s
, bootstrap is loaded up inside application.css, but when I run my specs, I 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 does this work when running as development but it cannot find the asset when running test?