M
M
Maxim Savichev2016-01-13 10:25:26
Ruby on Rails
Maxim Savichev, 2016-01-13 10:25:26

How to make Heroku see data from assets?

The library is connected from public/vendor via bower
config/application.rb

# Link to Bower
    config.assets.paths << Rails.root.join('vendor', 'assets', 'bower_components')

JS files in the dev environment work fine
But when I upload to Heroku
Heroku sees them. But for him these files are empty
  • Added to assets/javascripts/application.js
    // Bower
    //= require pixi-editor

  • Installed gem rails_12factor
  • Tried to write a command
    RAILS_ENV=production rake assets:clean assets:precompile
    via bash heroku and git push heroku master
  • Registered in config/application.rb
    config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif)

  • In config/environments/production.rb
    config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?


I went to heroku bash. The public folder with assets is full.
Why doesn't Heroku, which automatically runs rake assets:precompile with the rails_12factor gem, want to see the content?
UPD.
Removed turbolinks. JS in dev began to load from the first time, and not as before, from the second

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question