Closed imgarylai closed 9 years ago
I found the problem. The configuration, bower_rails.install_before_precompile = true
should be set to true.
Thanks for following up!
I'm having the same issue ONLY on Heroku with angular
:
Sprockets::FileNotFound: couldn't find file 'angular' with type 'application/javascript'
and I have this configuration set: bower_rails.install_before_precompile = true
This is how my application.js
looks like:
//= require jquery
//= require jquery_ujs
//= require angular/angular
//= require angular-route/angular-route
//= require angular-loader/angular-loader
//= require angular-rails-templates
//= require_tree ./templates
I can run RAILS_ENV=production rake assets:clean assets:precompile
locally just fine.
This is an useful gem to integrate rails with bower. However, I met some problem when I tried to deploy to heroku.
I'll try my best to describe my process of deploying to heroku. If there are problems of question , please comment below. I'll provide more information.
I think that if a rails app with bower want to deploy to heroku, the enviroment should be setup with nodejs and rails.
Thus, I have to create a heroku app in this way, https://github.com/ddollar/heroku-buildpack-multi, right?
I succeed to build the environment on heroku so far. However, when the step went to asset:precompile, there are problems. I got messages below:
The asset display in messages was installed by bower.
I read this https://github.com/rharriso/bower-rails/issues/124, but my project use lots of assets are installed by bower. I don't want to checkin my repo. Is there any solution?
The best way, I expect, is that I don't have to check in
bower_components
and app can be installed automatically when it be deployed.