2011-10-19 17 views
0

注意如何費時完成的請求的WEBrick變得非常慢後,我用active_admin

Started GET "/" for 127.0.0.1 at 2011-10-19 20:45:38 +0800 
Processing by MainController#index as HTML 
Book Load (0.9ms) SELECT "books".* FROM "books" 
Rendered application/_product.html.erb (66.8ms) 
Rendered main/index.html.erb within layouts/application (158.7ms) 
Rendered application/_header.html.erb (45.6ms) 
Rendered application/_search_cart.html.erb (1.6ms) 
Completed 200 OK in 350ms (Views: 347.9ms | ActiveRecord: 0.9ms) 

任何想法?

我還有什麼選擇可以將webrick替換爲默認服務器!

+0

試用[active_reload(https://github.com/paneq/active_reload)。它可能會或可能不會幫助。只是試驗。 – rubish

+1

我想我對這個類似問題的回答也回答你的問題: http://stackoverflow.com/questions/7826885/active-admin-slowing-down-rails-applicaton/7833222#7833222 –

回答

0

你可以嘗試用Rails-DEV-提升寶石(https://github.com/thedarkone/rails-dev-boost),以下內容添加到您的Gemfile,並做了捆綁安裝

gem 'rails-dev-boost', :git => 'https://github.com/thedarkone/rails-dev-boost.git', :require => 'rails_development_boost' 

但要小心,在更改lib /文件夾,初始化程序等中的代碼時,必須重新啓動服務器。

你也可以嘗試讓雜種作爲開發服務器工作。根據您的ruby/rails組合,以下內容會發生變化。更多的線索和信息:http://jan.varwig.org/archive/rails-3-and-mongrel,這應該工作鋼軌3.1和Ruby 1.9.2組合

group :development, :test do 
    # ... 
    # http://jan.varwig.org/archive/rails-3-and-mongrel 
    gem 'mongrel', '>= 1.2.0.pre2' 
end