2
我使用Puma作爲Rails應用程序,我需要加快迭代循環,使文件更改並讓Web服務器能夠重新加載頁面。現在至少需要30秒,這太慢了。理想情況下,這只是幾秒鐘。美洲獅:更快的服務器重新加載?
下面是從啓動服務器的輸出是否有幫助:
[26861] Puma starting in cluster mode...
[26861] * Version 2.8.2 (ruby 2.0.0-p451)
[26861] * Min threads: 4, max threads: 8
[26861] * Environment: development
[26861] * Process workers: 1
[26861] * Preloading application
[SKYLIGHT] [0.3.12] Running Skylight in development mode. No data will be reported until you deploy your app.
Deprecated, please require 'sidekiq/pro/web' now at /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.18/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
[26861] * Listening on tcp://0.0.0.0:4000
[26861] Use Ctrl-C to stop
[26939] + Gemfile in context: ~/project/Gemfile
2014-05-14T00:18:16Z 26939 TID-owgxfytuc INFO: Sidekiq Pro client with redis options {:url=>"redis://localhost:6001」, :driver=>:hiredis}
[26861] - Worker 0 (pid: 26939) booted, phase: 0
>您應該可以在Rails應用中進行更改,而無需在開發模式下重新啓動服務器 您是否在說文件更改會自動反映? Puma如何知道一個.rb文件如果沒有重新加載,它實際上會發生改變? –
那麼它不是真正的美洲獅,而是監測和重新加載的導軌http://crypt.codemancers.com/posts/2013-10-03-rails-reloading-in-dev-mode/ –
Spring僅支持Rails 4.0+ ,根據回購的README.md,它默認包含在Rails 4.1+中。 – sealocal