javascript - Heroku not including JS files but CSS files but works on localhost -


don't ignore this,yeah there similar questions not of solutions worked me.

i have rails app on heroku not including js files other

application.js
//= require jquery //= require jquery_ujs //= require turbolinks //= require bootstrap-sprockets //= require react //= require react_ujs //= require components //= require js-routes //= require axios 
component.js
//= require   lodash //= require    alt //= require   axios //= require   initialize //= require_tree  ./react 

and yet none of files in application.js files included, have jquery's code loaded none of other js files included.

config/production.rb

rails.application.configure   # settings specified here take precedence on in config/application.rb.    # code not reloaded between requests.   config.cache_classes = true    # eager load code on boot. eager loads of rails ,   # application in memory, allowing both threaded web servers   # , relying on copy on write perform better.   # rake tasks automatically ignore option performance.   config.eager_load = true    # full error reports disabled , caching turned on.   config.consider_all_requests_local       = false   config.action_controller.perform_caching = true    # disable serving static files `/public` folder default since   # apache or nginx handles this.   config.public_file_server.enabled = env['rails_serve_static_files'].present?    # compress javascripts , css.   config.assets.js_compressor = :uglifier   config.assets.css_compressor = :sass    # not fallback assets pipeline if precompiled asset missed.   config.assets.compile = true    # asset digests allow set far-future http expiration dates on assets,   # yet still able expire them through digest params.   config.assets.digest = true    config.assets.compress = true    # `config.assets.precompile` , `config.assets.version` have moved config/initializers/assets.rb    # enable serving of images, stylesheets, , javascripts asset server.   # config.action_controller.asset_host = 'http://assets.example.com'    # specifies header server uses sending files.   # config.action_dispatch.x_sendfile_header = 'x-sendfile' # apache   # config.action_dispatch.x_sendfile_header = 'x-accel-redirect' # nginx    # action cable endpoint configuration   # config.action_cable.url = 'wss://example.com/cable'   # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]    # force access app on ssl, use strict-transport-security, , use secure cookies.   # config.force_ssl = true    # use lowest log level ensure availability of diagnostic information   # when problems arise.   config.log_level = :debug    # prepend log lines following tags.   config.log_tags = [ :request_id ]    # use different logger distributed setups.   # require 'syslog/logger'   # config.logger = activesupport::taggedlogging.new(syslog::logger.new 'app-name')    if env["rails_log_to_stdout"].present?     config.logger = activesupport::taggedlogging.new(logger.new(stdout))   end    # use different cache store in production.   # config.cache_store = :mem_cache_store    # use real queuing backend active job (and separate queues per environment)   # config.active_job.queue_adapter     = :resque   # config.active_job.queue_name_prefix = "noirbnb_#{rails.env}"   config.action_mailer.perform_caching = false    # ignore bad email addresses , not raise email delivery errors.   # set true , configure email server immediate delivery raise delivery errors.   # config.action_mailer.raise_delivery_errors = false    # enable locale fallbacks i18n (makes lookups locale fall   # i18n.default_locale when translation cannot found).   config.i18n.fallbacks = true    # send deprecation notices registered listeners.   config.active_support.deprecation = :notify    # use default logging formatter pid , timestamp not suppressed.   config.log_formatter = ::logger::formatter.new    # not dump schema after migrations.   config.active_record.dump_schema_after_migration = false    config.assets.precompile += %w(*.js)    config.public_file_server.enabled = true   config.react.variant = :production  end 

application.rb

require file.expand_path('../boot', __file__)  require 'rails/all'  # require gems listed in gemfile, including gems # you've limited :test, :development, or :production. bundler.require(*rails.groups)  module noirbnb   class application < rails::application     # settings in config/environments/* take precedence on specified here.     # application configuration should go files in config/initializers     # -- .rb files in directory automatically loaded.     config.assets.paths << rails.root.join('vendor','assets', 'fonts','clever')     config.assets.enabled = true     config.serve_static_assets = true   end end 

i tried

rails_env=production rake assets:precompile 

but still js files not loaded , not of javascript files loaded. have gem 'rails_12factor', group: :production in gemfile still js files not included.

i tried heroku bash , ran rake assets:precompile no difference.

now i'm tired , frustrated.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -