Rails server takes a long time to start

I was working on a Rails project, but so far I was oblivious to the fact that my computer battery died while the rails server was still running.

Now when I type rails s

, the rails server is taking a very long time to start up. I calculated it for about 40 seconds. It's not that long ago.

I tried looking for other answers, but nothing really worked.

Any help is appreciated, thanks.

I have a Macbook Pro 2010, Rails 4.2.0 running

+3


source to share


1 answer


You can set the eager_loading and cache_control values ​​to false, and then it will take a few seconds for the server to start

  1. go to development.rb file
  2. "config.cache_classes" and "config.eager_load" become false


Note. Setting cache_control to false gradually increases server load times ( in a development environment ) because you don't need to restart the web server when you make changes to your code. Setting eager_load to false will increase the server load time from 2 seconds to 10 seconds, but this can lead to inconsistencies, so use it wisely.

0


source







All Articles