Rails 3.2.1开发模式非常慢

时间:2012-02-10 13:28:54

标签: ruby-on-rails asset-pipeline ruby-on-rails-3.2

为什么我的Rails开发环境非常慢?我在日志中看到2-3秒的呼叫,控制器动作的实际时间大约是10秒。似乎花了很多时间在资产管道上。

像rails-dev-tweaks这样的宝石到目前为止并没有真正的帮助。

  • 我的设置:
  • OS X已完全更新
  • Ruby 1.9.3-p0 via rvm
  • Rails 3.2.1
  • 通过自制程序安装的MySQL
  • 服务器POW或webrick

日志输出:

Started GET "/" for 127.0.0.1 at 2012-02-10 13:14:34 +0000
Processing by HomeController#index as HTML
  User Load (0.3ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
  User Load (0.7ms)  SELECT `users`.* FROM `users` 
  Account Load (0.3ms)  SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 1 LIMIT 1
  Rendered home/index.html.erb within layouts/application (40.2ms)
  Rendered shared/_navigation.html.erb (0.7ms)
Completed 200 OK in 2084ms (Views: 44.6ms | ActiveRecord: 9.6ms)

1 个答案:

答案 0 :(得分:2)

好的,我弄清楚是什么让它变慢了。它是来自http://github.com/RailsApps/rails3-devise-rspec-cucumber

的应用模板附带的Rails Footnotes gem

我还在github上创建了一个问题: https://github.com/RailsApps/rails3-devise-rspec-cucumber/issues/22