Rails 4 - NO manifest.json after assets precompile on production server -
here app/assets/ rails 4.2 app.
there 3 bootstraps js , css files. after deploying production (ubuntu 12.1), assets precompile done on server (deployed under suburi):
rails_env=production bundle exec rake assets:precompile rails_relative_url_root=/mysuburi
here production.rb
:
config.cache_classes = true config.eager_load = true config.consider_all_requests_local = false config.action_controller.perform_caching = true config.serve_static_files = false #env['rails_serve_static_files'].present? config.assets.compress = true config.assets.js_compressor = :uglifier config.assets.compile = false config.assets.digest = true config.log_level = :debug config.i18n.fallbacks = true config.active_support.deprecation = :notify config.log_formatter = ::logger::formatter.new config.active_record.dump_schema_after_migration = false
here head of application.css.scss
:
@import "bootstrap.min.css"; @import "bootstrap-theme.min.css"; @import "simple_form.css.scss"; @import "user_menus.css.scss";
in application.js
, has:
//= require bootstrap.min
here output of ls
public/assets/ on production server:
application-05cf37813d76c2bd659271403789374cc118f1a4e616ec220969577b79ff6514.css application-375b4b5d8fc285716f4fdca966aa960912efe8292242df8f1a60b99d5caa4b02.js authentify banquet_coursex banquetx biz_workflowx commonx glyphicons-halflings-regular-5d234508037dc13a419ef6ce48f3fc73dbb477f1a162c052b872182b494e626e.svg glyphicons-halflings-regular-bd18efd3efd70fec8ad09611a20cdbf99440b2c1d40085c29be036f891d65358.ttf glyphicons-halflings-regular-f495f34e4f177cf0115af995bbbfeb3fcabc88502876e76fc51a4ab439bc8431.eot glyphicons-halflings-regular-fc969dc1c6ff531abcf368089dcbaf5775133b0626ff56b52301a059fc0f9e1e.woff jquery-ui searchx state_machine_logx user_manualx user_menus-7c46e17f4172c2a954eeaf85e80b4e030d1ed0fb3927288bbe07eeb4fb8cbfc5.css
by comparing other rails app, missing manifest.json
under /assets. tried various config options in config/environment/production.rb
no avail. option works on production server live compilation of config.assets.compile = true
(not recommended). wrong our code cause assets precompile failing?
update: have re-built rails app ground , assets problem remains same. assets precompile issue may have nothing setup in config/production.rb' , 'config/initializers/aseets.rb
suspect. rolling version of bundler
, rake
did not help. same bootstrap css , js files have been used in rails 4.2 app running on same production server without problem.
if you're using sprockets 3.x
, manifest file now named .sprockets-manifest-md5hash.json
, stated in upgrading guide
Comments
Post a Comment