2011-10-19 11 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