0

just a silly quick question, i set up Bootstrap 3 follow by the steps from here. It works at dev mode but no prod mode. Just want to ask what kind of problem can cause that? If need codes, I will show it later. Thank you.

3
  • what do you mean with "It not works in prod mode" - what does exactly not working? more information would be helpful. Commented Aug 29, 2014 at 7:02
  • 2
    Did you run `app/console --env=prod assets:install web´ and ´app/console --env=prod assetic:dump´ on production server ? Commented Aug 29, 2014 at 7:12
  • You all right, I have to dump assets in prod mod. Cause I set "use_controller" as false. THX Commented Aug 31, 2014 at 23:34

1 Answer 1

1

You have to dump your assets on production. During development, assetic converts the assets each time you request them. Because that'll cost some time, it doesn't do this in production. So, you have to dump the assets (which means assetic only converts the assets once) in production.

$ php app/console assetic:dump --env=prod --no-debug

Read more about this in http://symfony.com/doc/current/cookbook/assetic/asset_management.html#dumping-asset-files-in-the-prod-environment

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, it's solved! In dev, I dont wanna dump the assets, it makes a lot files. But in prod, it seems better to use dump, its faster

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.