• #8 楼 @d4rkl0rd 我没有遇到过这个提示,请问你的 ruby 版本和 gem 版本都是多少呢

  • 令人苦恼的性能问题 at 2014年01月16日

    #20 楼 @quakewang 感谢,我来看看 rabl

  • 令人苦恼的性能问题 at 2014年01月15日

    #13 楼 @aptx4869 缓存是肯定可以解决问题的,但是我比较奇怪的就是,现在的 CPU 占用总是 50% 左右,mongodb 也没有大于 10ms 的查询,但是性能就是上不去。我还是怀疑是什么地方配置不正确,想问问大家有没有类似的经历。 我做过去除 reference 和权限的 API 并发测试,单台 rainbows 也只能跑到 110 并发左右,CPU 占用 33%,明显不对嘛

  • 令人苦恼的性能问题 at 2014年01月15日

    #3 楼 @sevk rack-perf-tools

  • 令人苦恼的性能问题 at 2014年01月15日

    #5 楼 @bugmenot 有个需求,对每一条返回的数据都要针对 api 的 current_user 进行权限的判断,返回不同的数据。for example 取 topic,当前用户对每一个 topic 的权限(是否可以称赞,取消称赞,是否可以回复,是否可以设置置顶)都要列在 topic 中。 所以,如果缓存,就相当于有多少用户,创建多少缓存

  • 令人苦恼的性能问题 at 2014年01月15日

    #1 楼 @luikore 2.1 我试试去 那个是个 API 服务,页面缓存不大容易了,关联的数据比较多,缓存比较困难

  • 如果是任意项目呢?非 Rails 比如 Sinatra 可以自动加载么?

  • 大家用 git rebase 频繁吗? at 2013年12月13日

    git flow 的分支策略可以减少 git rebase 的使用,个人认为,git pull --rebase 是必须的用法,合并分支就用 git-flow 就可以了,不用太在意细节。

    git rebase 的强大功能就是改写历史 rebase -i 可以做很多事。

  • Sounds good

  • #1 楼 @Victor 这种多级的一般作为类别管理神马的,100W 数据比较夸张了,拿来用用还不错,算法值得学习

  • #1 楼 @linjunhalida 只要一压力就这样,但是平常查询什么的,也不出问题

  • 
    E, [2013-11-24T18:52:09.628399 #2355] ERROR -- : app error: undefined method `__bson_load__' for nil:NilClass (NoMethodError)
    E, [2013-11-24T18:52:09.628594 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/bson/extensions/array.rb:29:in `__bson_load__'
    E, [2013-11-24T18:52:09.645368 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/bson/extensions/hash.rb:30:in `__bson_load__'
    E, [2013-11-24T18:52:09.645538 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/bson/document.rb:21:in `deserialize'
    E, [2013-11-24T18:52:09.645605 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/connection.rb:116:in `block (2 levels) in read'
    E, [2013-11-24T18:52:09.645667 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/connection.rb:115:in `times'
    E, [2013-11-24T18:52:09.645730 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/connection.rb:115:in `each'
    E, [2013-11-24T18:52:09.645792 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/connection.rb:115:in `map'
    E, [2013-11-24T18:52:09.645854 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/connection.rb:115:in `block in read'
    E, [2013-11-24T18:52:09.645915 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/connection.rb:202:in `with_connection'
    E, [2013-11-24T18:52:09.645977 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/connection.rb:97:in `read'
    E, [2013-11-24T18:52:09.646039 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/protocol/query.rb:163:in `receive_replies'
    E, [2013-11-24T18:52:09.646120 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/connection.rb:135:in `block in receive_replies'
    E, [2013-11-24T18:52:09.646205 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/connection.rb:134:in `map'
    E, [2013-11-24T18:52:09.646277 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/connection.rb:134:in `receive_replies'
    E, [2013-11-24T18:52:09.646343 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/node.rb:584:in `block (2 levels) in flush'
    E, [2013-11-24T18:52:09.646407 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/node.rb:150:in `ensure_connected'
    E, [2013-11-24T18:52:09.646469 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/node.rb:582:in `block in flush'
    E, [2013-11-24T18:52:09.646542 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/node.rb:597:in `logging'
    E, [2013-11-24T18:52:09.646620 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/node.rb:581:in `flush'
    E, [2013-11-24T18:52:09.646687 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/node.rb:570:in `process'
    E, [2013-11-24T18:52:09.646751 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/node.rb:370:in `query'
    E, [2013-11-24T18:52:09.646815 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/session/context.rb:44:in `block in query'
    E, [2013-11-24T18:52:09.646878 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/session/context.rb:105:in `block in with_node'
    E, [2013-11-24T18:52:09.646953 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/cluster.rb:251:in `with_secondary'
    E, [2013-11-24T18:52:09.647032 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/session/context.rb:104:in `with_node'
    E, [2013-11-24T18:52:09.647110 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/session/context.rb:43:in `query'
    E, [2013-11-24T18:52:09.647205 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/moped-1.5.1/lib/moped/query.rb:115:in `first'
    E, [2013-11-24T18:52:09.647296 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/mongoid-3.1.5/lib/mongoid/contextual/mongo.rb:196:in `block in first'
    E, [2013-11-24T18:52:09.647363 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/mongoid-3.1.5/lib/mongoid/contextual/mongo.rb:506:in `with_sorting'
    E, [2013-11-24T18:52:09.647429 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/mongoid-3.1.5/lib/mongoid/contextual/mongo.rb:195:in `first'
    E, [2013-11-24T18:52:09.647492 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/mongoid-3.1.5/lib/mongoid/contextual.rb:19:in `first'
    E, [2013-11-24T18:52:09.647554 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/mongoid-3.1.5/lib/mongoid/finders.rb:102:in `find_by'
    E, [2013-11-24T18:52:09.647618 #2355] ERROR -- : /home/group/csdn_group/app/auth_middleware.rb:13:in `call'
    E, [2013-11-24T18:52:09.647679 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/rack-protection-1.5.1/lib/rack/protection/xss_header.rb:18:in `call'
    E, [2013-11-24T18:52:09.647740 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/rack-protection-1.5.1/lib/rack/protection/base.rb:50:in `call'
    E, [2013-11-24T18:52:09.647800 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/rack-protection-1.5.1/lib/rack/protection/base.rb:50:in `call'
    E, [2013-11-24T18:52:09.647863 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/rack-protection-1.5.1/lib/rack/protection/path_traversal.rb:16:in `call'
    E, [2013-11-24T18:52:09.647925 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/rack-protection-1.5.1/lib/rack/protection/json_csrf.rb:18:in `call'
    E, [2013-11-24T18:52:09.647997 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/rack-protection-1.5.1/lib/rack/protection/base.rb:50:in `call'
    E, [2013-11-24T18:52:09.648061 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/rack-protection-1.5.1/lib/rack/protection/base.rb:50:in `call'
    E, [2013-11-24T18:52:09.648135 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/rack-protection-1.5.1/lib/rack/protection/frame_options.rb:31:in `call'
    E, [2013-11-24T18:52:09.648202 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
    E, [2013-11-24T18:52:09.648264 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
    E, [2013-11-24T18:52:09.648325 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
    E, [2013-11-24T18:52:09.648386 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
    E, [2013-11-24T18:52:09.648447 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/sinatra-1.4.4/lib/sinatra/base.rb:2004:in `call'
    E, [2013-11-24T18:52:09.648510 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/sinatra-1.4.4/lib/sinatra/base.rb:1469:in `block in call'
    E, [2013-11-24T18:52:09.648571 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/sinatra-1.4.4/lib/sinatra/base.rb:1778:in `synchronize'
    E, [2013-11-24T18:52:09.648643 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/sinatra-1.4.4/lib/sinatra/base.rb:1469:in `call'
    E, [2013-11-24T18:52:09.648717 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/padrino-core-0.11.2/lib/padrino-core/router.rb:83:in `block in call'
    E, [2013-11-24T18:52:09.648781 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/padrino-core-0.11.2/lib/padrino-core/router.rb:76:in `each'
    E, [2013-11-24T18:52:09.648844 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/padrino-core-0.11.2/lib/padrino-core/router.rb:76:in `call'
    E, [2013-11-24T18:52:09.648906 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:580:in `process_client'
    E, [2013-11-24T18:52:09.648969 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:660:in `worker_loop'
    E, [2013-11-24T18:52:09.649045 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:527:in `spawn_missing_workers'
    E, [2013-11-24T18:52:09.649120 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:538:in `maintain_worker_count'
    E, [2013-11-24T18:52:09.649261 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:303:in `join'
    E, [2013-11-24T18:52:09.649330 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/gems/unicorn-4.7.0/bin/unicorn:126:in `<top (required)>'
    E, [2013-11-24T18:52:09.649401 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/bin/unicorn:19:in `load'
    E, [2013-11-24T18:52:09.649465 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/bin/unicorn:19:in `<main>'
    E, [2013-11-24T18:52:09.649528 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in `eval'
    E, [2013-11-24T18:52:09.649600 #2355] ERROR -- : /home/group/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in `<main>'
    E, [2013-11-24T18:52:40.433860 #2317] ERROR -- : worker=1 PID:2349 timeout (31s > 30s), killing
    E, [2013-11-24T18:52:40.434031 #2317] ERROR -- : worker=4 PID:2352 timeout (31s > 30s), killing
    E, [2013-11-24T18:52:40.440808 #2317] ERROR -- : reaped #<Process::Status: pid 2349 SIGKILL (signal 9)> worker=1
    E, [2013-11-24T18:52:40.440952 #2317] ERROR -- : reaped #<Process::Status: pid 2352 SIGKILL (signal 9)> worker=4
    I, [2013-11-24T18:52:40.459634 #2360]  INFO -- : worker=1 ready
    I, [2013-11-24T18:52:40.461923 #2363]  INFO -- : worker=4 ready
    
    
  • 自己顶下,求帮助啊

  • Gollum

  • 我以前就是搞嵌入式的,现在投身 ruby 啦,觉得很不错的。 @xmonkeycn 嵌入式的收入不一定高一些吧?

  • RubyMotion Runtime Guide 中文版 at 2013年06月09日

    不错,支持下,对了,那个 RubyMotion 有试用版么?

  • 帮助很大,谢谢 lz

  • 我以前上学的时候就喜欢用挂了的 IE 画画

  • rails Views 引入 css 问题 at 2013年06月03日

    哦,支持 markdown 啊,刚来论坛还不熟悉。 application.html.erb

    <%- unless content_for?(:custom_stylesheet) %>
    <%= stylesheet_link_tag "application", :media => "all" %>
    <%- end %>
    

    admin.html.erb

    <%- content_for :custom_stylesheet do %>
    <%= stylesheet_link_tag "other css" %>
    <%- end %>
    

    @linjunhalida 这样 OK?

  • rails Views 引入 css 问题 at 2013年06月03日

    用块就可以了 application.html.erb <%- unless content_for?(:custom_stylesheet) %> <%= stylesheet_link_tag "application", :media => "all" %> <%- end %> admin.html.erb <%- content_for :custom_stylesheet do %> <%= stylesheet_link_tag "other css" %> <%- end %>

  • VS 确实挺好用的,除了启动慢一些。@blacktulip xcode 也没有那么烂吧。。起码对于 objc 还是支持的挺好的

  • cocoa 的集合 at 2013年06月01日

    LZ 说的不错,函数式编程我也很喜欢。 我是先搞了 IOS,现在在搞 ROR,我发现利用 ROR 和 Ruby 的一些概念到 ios,是有很大的推动作用的。ruby 的 block 可以一定程度的转化到 objc 上,只是 objc 的代码更长一些。

  • RubyMotion - Ruby 写 iOS 应用 at 2013年05月31日

    rubymotion 价格好贵啊 几个问题?1. 支持语法补全么?vim 插件?

    1. cocoapods 的库可以直接使用么?
    2. xib 和 storyboard 是否支持?
    3. coredata 是否支持? 用过的人回答下,我考虑下是否入手看看

    @freemem Titanium 我们用过,javascriptd 写法和性能感觉不佳,我个人还是倾向原生开发。 考虑 ruby 也不会考虑 js