Heroku deploy with bower-rails

5

I have gem 'bower-rails' installed in my application but when deploy I have the following error:

I added the gem rails_12factor

I'm using buildpack :

heroku buildpacks:set https://github.com/heroku/heroku-buildpack-ruby

You are returning the following error

remote:        Bundle complete! 37 Gemfile dependencies, 88 gems now installed.
remote:        Gems in the groups development and test were not installed.
remote:        Bundled gems are installed into ./vendor/bundle.
remote:        Bundle completed (121.61s)
remote:        Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        Bower not found! You can install Bower using Node and npm:
remote:        $ npm install bower -g
remote:        For more info see http://bower.io/
remote:        Bower not found! You can install Bower using Node and npm:
remote:        $ npm install bower -g
remote:        For more info see http://bower.io/
remote:        Bower not found! You can install Bower using Node and npm:
remote:        $ npm install bower -g
remote:        For more info see http://bower.io/
remote:        I, [2015-05-22T15:10:45.780939 #1511]  INFO -- : Writing /tmp/build_4a3496582f01151aa98229107df764c1/public/assets/about-circles-59d0b7d256daae90abc3db6014a27a1017f6f3eea84940e680aeadcee6a9f3ba.jpg
remote:        I, [2015-05-22T15:10:45.801573 #1511]  INFO -- : Writing /tmp/build_4a3496582f01151aa98229107df764c1/public/assets/imac-984a728f1d9fe0dc438aab4016ad8a8e56f760f40517770dd1e711cb62fe64a1.jpg
remote:        rake aborted!
remote:        Sprockets::FileNotFound: couldn't find file 'gmaps-waypoints.js/index.js' with type 'application/javascript'
remote:        /tmp/build_4a3496582f01151aa98229107df764c1/vendor/assets/javascripts/vendors.js:1

What could it be:

    
asked by anonymous 22.05.2015 / 16:44

2 answers

0

It seems to me that assets are not being found. try adding in your config / application.rb

config.assets.paths << Rails.root.join("vendor","assets","bower_components")
config.assets.paths << Rails.root.join("vendor","assets","bower_components","assets","fonts")
config.assets.precompile << %r(.*.(?:eot|svg|ttf|woff|woff2)$)

In any case, I created this repository in github showing use of gem bower-rails. The deploy in heroku rolled smoothly. recipe-tutorial-angular

I copied this tutorial: angular-rails-tutorial

    
05.01.2016 / 22:26
0

I have the same problem but the solution presented by colleague @amalrik does not solve the problem. Because in the case of the recipe he presents in link he adds libs js to git.

The interesting thing would be to get Heroku to run bower install before rake assets:precompile .

I was able to solve this by setting to use the following buildpack link

    
19.08.2016 / 07:14