Rails development server is slow and takes a long time to load a simple page

后端 未结 1 904
时光取名叫无心
时光取名叫无心 2021-01-31 03:31

There are similar threads about Rails being slow in development mode, but none of the solutions in those threads has made any difference for me. I\'ve tried installing gems that

相关标签:
1条回答
  • 2021-01-31 03:44

    Copying the answer from the comments (and edited question body) in order to remove this question from the "Unanswered" filter:

    I tried what they recommended in this post (Diagnosing the cause of slow view rendering), and it worked. Asset pipeline is enabled, and page loading goes from 20-40 seconds to like 1 second. much better at least.

    ...

    Basically, it turns out the delay was being caused by config.assets.debug = true inside of development.rb. I made it false and it seems to be faster.

    The Rails guys say that enabling debug will slow down really complicated apps, but this was just a simple tutorial app with literally 1 model/controller/view. Anyways, I hope these performance gains last, but it does solve my immediate problem.

    ~ answer per Dave Bowman

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