Heroku deploy with Bower-Rails

Asked

Viewed 213 times

7

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

I added the gem rails_12factor

I’m using the buildpack:

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

Is 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 be:

  • You already installed Gem rails_12factor?

  • Is installed in the group :Production. View the installation log: remote: Installing rails_12factor 0.0.3

  • Set up some custom buildpack?

  • I updated the question.

  • I had a similar problem, but when I installed rails_12factor and changed the buildpack the problem solved.

  • But I am using the buildpack of Heroku itself. Which one you used?

  • Has that question been solved? I had a similar problem and I chose to use Rails-Assets! I honestly tried everything ahahahahha!

  • He said to try to put the Bower in the package json. but I haven’t had time to test it yet. Try it if it works out let me know too.

Show 4 more comments

2 answers

1

I don’t think the Avits are being found. tries to add 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 on github showing Gem Bower-Rails usage. Deploy on Heroku rolled smoothly. receta-tutorial-angular

which in turn I copied from this tutorial: angular-Rails-tutorial

1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.