Tag: mongrel

如何在Thin控制台窗口中查看调试代码?

在Mongrel中,我们可以看到任何ruby调试代码。 安装后瘦和做thin start 。 我没有在控制台窗口看到任何调试代码。 这是不是很好吗? 我们是否应该在新的控制台窗口中使用tail -f log/development.log来查看调试代码?

gem install mongrel使用ruby 1.9.1失败

我昨天开始自己进入rails开发。 我安装了ruby 1.9.1,rubygems和rails。 运行gem install mongrel工作正常,表面上也安装了mongrel。 我有点疑惑,因为: 脚本/服务器默认启动webrick which mongrel没有回报 locate mongrel返回很多条目 /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1 /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel 。 。 。 在/ usr / local / bin目录/ mongrel_rails /usr/local/lib/ruby/gems/1.9.1/cache/mongrel-1.1.5.gem /usr/local/lib/ruby/gems/1.9.1/doc/actionpack-2.3.2/rdoc/files/lib/action_controller/vendor/rack-1_0/rack/handler/evented_mongrel_rb.html /usr/local/lib/ruby/gems/1.9.1/doc/actionpack-2.3.2/rdoc/files/lib/action_controller/vendor/rack-1_0/rack/handler/mongrel_rb.html /usr/local/lib/ruby/gems/1.9.1/doc/actionpack-2.3.2/rdoc/files/lib/action_controller/vendor/rack-1_0/rack/handler/swiftiplied_mongrel_rb.html /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/handler/evented_mongrel.rb /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/handler/mongrel.rb /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/handler/swiftiplied_mongrel.rb /usr/local/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5 。 。 。 看起来我安装了mongrel(默认安装和我的自定义安装)。 那么为什么不是哪个杂种会回归呢。 还试图使用gem install mongrel返回重新gem install mongrel返回抛出自己的一组exception: 构建原生扩展。 这可能需要一段时间…… 错误:安装mongrel时出错: 错误:无法构建gem原生扩展。 / usr / local / bin / ruby​​ […]

Ruby On Rails很慢……?

我正在编写一个Web应用程序来监控家具厂的生产流程。 它有数千个数据需要处理。 到目前为止,我在Mongrel + MySQL上运行RoR并且它真的很慢(对于某些视图来说是2-4分钟)。 当我查看RoR日志时,似乎数据库查询不是很慢(0-10ms)。 RoR在将​​数据库数据转换为对象时是否会变慢? 杂种慢吗? 编辑 :第一件事:我在开发中。 ENV。 在生产环境中,最慢的视图需要2分钟(在好的计算机上会减少不到1分钟,我的是5年)。 有了ruby-prof和一些常识,我发现哪些方法正在减慢应用程序的速度。 问题是在大型数据集的循环中调用单个SQL查询: ofs = Ofkb.find_by_sql [“..some large sql query…”] for of in ofs # About 700-1000 elements ops = Operation.find(..the single query..) etc. end 以下是这些方法的ruby-prof结果: %self total self wait child calls name 32.19 97.91 97.91 0.00 0.00 55 IO#gets (ruby_runtime:0} 28.31 86.39 86.08 […]