Poor time performance of 'rake assets:precompile'

前端 未结 1 840
野的像风
野的像风 2021-01-18 17:20

Running:

bundle exec rake assets:precompile RAILS_ENV=production

Takes about 6 minutes for 15 .js files of about 250kb total. It should no

1条回答
  •  北恋
    北恋 (楼主)
    2021-01-18 17:57

    Which server are you running? Is it Ubuntu, Debian, Mac? Make sure you have this in your Gemfile:

    group :production do
      gem "libv8"
      gem "therubyracer", :require => 'v8'
    end
    

    See this page for more info: https://github.com/rails/rails/issues/2537

    You can also try to remove unused files in your app/assets/* folders. Time is most spent on JS compilation.

    0 讨论(0)
提交回复
热议问题