• 北京有这么多活动啊,帝都的人真幸福

  • 用虚拟机的话好像可以在 Windows 下写代码,在 Linux 调试,论坛里的相关帖子 http://ruby-china.org/topics/2553 http://ruby-china.org/topics/3327

  • 怎么才能活得快乐? at 2012年11月21日

    #3 楼 @AlphaLiu 写代码写到不缺钱用,这也快乐了

  • 和这个http://bookfor.us/很像啊

  • 我的讲稿 Ruby Arduino Hacking at 2012年11月19日

    我正在做一个 Arduino 小车,Ruby 可以派上用场了

  • #3 楼 @fsword 大神

  • 终于有人谈到 Arduino 了,我用 Arduino 做了一个可以用安卓手机遥控的小车,好像 RubyConfChina 里 QuakeWang 就是讲的 ruby arduino hacking - 串口通讯,很好的学习材料

  • 什么叫 Dos 攻击

  • 是这样吗?

  • 还不能显示帖子

  • 这个 Bug 挺有意思的 at 2012年11月07日

    ID 和 Name 都是 account

  • 看来,我还是要从 JavaScript 学起啊,多谢了

  • RubyConfChina 2012 参会指南 at 2012年11月07日

    我看到了 Ruby Arduino Hacking,原来还可以这么用啊,Yeelink 就是这样实现的吧

  • #20 楼 @huacnlee #22 楼 @tiseheaini 我把 routes.rb 里面的一句 root :to => 'posts#index', as: 'post' 换做 root :to => 'posts#index' 就正常了,这是什么原因?

  • 新手问题 (已搞定) at 2012年11月04日

    <%= link_to "删除", feed_item, method: :delete, data: { confirm: "你确定?"}, title: feed_item.content, :class=>"icon-remove" %>

  • 新手问题 (已搞定) at 2012年11月04日
  • 北京清華大學 RubyGems 鏡像 at 2012年11月04日

    不是教育网有没有问题

  • #20 楼 @huacnlee 去掉之后还是不行,还是这个问题

  • @huacnlee Full Trace:

    /home/victor/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/cgi/util.rb:7:in `escape'
    activesupport (3.2.7) lib/active_support/core_ext/object/to_query.rb:10:in `to_query'
    activesupport (3.2.7) lib/active_support/core_ext/object/to_param.rb:52:in `block in to_param'
    activesupport (3.2.7) lib/active_support/core_ext/object/to_param.rb:51:in `each'
    activesupport (3.2.7) lib/active_support/core_ext/object/to_param.rb:51:in `collect'
    activesupport (3.2.7) lib/active_support/core_ext/object/to_param.rb:51:in `to_param'
    actionpack (3.2.7) lib/action_dispatch/http/url.rb:47:in `url_for'
    actionpack (3.2.7) lib/action_dispatch/routing/route_set.rb:590:in `url_for'
    actionpack (3.2.7) lib/action_dispatch/routing/url_for.rb:148:in `url_for'
    actionpack (3.2.7) lib/action_view/helpers/url_helper.rb:107:in `url_for'
    actionpack (3.2.7) lib/action_dispatch/routing/route_set.rb:213:in `post_path'
    actionpack (3.2.7) lib/action_dispatch/routing/polymorphic_routes.rb:129:in `polymorphic_url'
    actionpack (3.2.7) lib/action_dispatch/routing/polymorphic_routes.rb:135:in `polymorphic_path'
    actionpack (3.2.7) lib/action_view/helpers/url_helper.rb:111:in `url_for'
    actionpack (3.2.7) lib/action_view/helpers/url_helper.rb:242:in `link_to'
    app/views/posts/index.html.erb:6:in `block in _app_views_posts_index_html_erb___207551636_84847140'
    activerecord (3.2.7) lib/active_record/relation/delegation.rb:6:in `each'
    activerecord (3.2.7) lib/active_record/relation/delegation.rb:6:in `each'
    app/views/posts/index.html.erb:3:in `_app_views_posts_index_html_erb___207551636_84847140'
    actionpack (3.2.7) lib/action_view/template.rb:145:in `block in render'
    activesupport (3.2.7) lib/active_support/notifications.rb:125:in `instrument'
    actionpack (3.2.7) lib/action_view/template.rb:143:in `render'
    actionpack (3.2.7) lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template'
    actionpack (3.2.7) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
    activesupport (3.2.7) lib/active_support/notifications.rb:123:in `block in instrument'
    activesupport (3.2.7) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
    activesupport (3.2.7) lib/active_support/notifications.rb:123:in `instrument'
    actionpack (3.2.7) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
    actionpack (3.2.7) lib/action_view/renderer/template_renderer.rb:46:in `block in render_template'
    actionpack (3.2.7) lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout'
    actionpack (3.2.7) lib/action_view/renderer/template_renderer.rb:45:in `render_template'
    actionpack (3.2.7) lib/action_view/renderer/template_renderer.rb:18:in `render'
    actionpack (3.2.7) lib/action_view/renderer/renderer.rb:36:in `render_template'
    actionpack (3.2.7) lib/action_view/renderer/renderer.rb:17:in `render'
    actionpack (3.2.7) lib/abstract_controller/rendering.rb:110:in `_render_template'
    actionpack (3.2.7) lib/action_controller/metal/streaming.rb:225:in `_render_template'
    actionpack (3.2.7) lib/abstract_controller/rendering.rb:103:in `render_to_body'
    actionpack (3.2.7) lib/action_controller/metal/renderers.rb:28:in `render_to_body'
    actionpack (3.2.7) lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
    actionpack (3.2.7) lib/abstract_controller/rendering.rb:88:in `render'
    actionpack (3.2.7) lib/action_controller/metal/rendering.rb:16:in `render'
    actionpack (3.2.7) lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
    activesupport (3.2.7) lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
    /home/victor/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
    activesupport (3.2.7) lib/active_support/core_ext/benchmark.rb:5:in `ms'
    actionpack (3.2.7) lib/action_controller/metal/instrumentation.rb:40:in `block in render'
    actionpack (3.2.7) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
    activerecord (3.2.7) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
    actionpack (3.2.7) lib/action_controller/metal/instrumentation.rb:39:in `render'
    actionpack (3.2.7) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
    actionpack (3.2.7) lib/action_controller/metal/mime_responds.rb:196:in `respond_to'
    app/controllers/posts_controller.rb:12:in `index'
    actionpack (3.2.7) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
    actionpack (3.2.7) lib/abstract_controller/base.rb:167:in `process_action'
    actionpack (3.2.7) lib/action_controller/metal/rendering.rb:10:in `process_action'
    actionpack (3.2.7) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
    activesupport (3.2.7) lib/active_support/callbacks.rb:436:in `_run__881899361__process_action__894307140__callbacks'
    activesupport (3.2.7) lib/active_support/callbacks.rb:405:in `__run_callback'
    activesupport (3.2.7) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
    activesupport (3.2.7) lib/active_support/callbacks.rb:81:in `run_callbacks'
    actionpack (3.2.7) lib/abstract_controller/callbacks.rb:17:in `process_action'
    actionpack (3.2.7) lib/action_controller/metal/rescue.rb:29:in `process_action'
    actionpack (3.2.7) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
    activesupport (3.2.7) lib/active_support/notifications.rb:123:in `block in instrument'
    activesupport (3.2.7) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
    activesupport (3.2.7) lib/active_support/notifications.rb:123:in `instrument'
    actionpack (3.2.7) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
    actionpack (3.2.7) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
    activerecord (3.2.7) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
    actionpack (3.2.7) lib/abstract_controller/base.rb:121:in `process'
    actionpack (3.2.7) lib/abstract_controller/rendering.rb:45:in `process'
    actionpack (3.2.7) lib/action_controller/metal.rb:203:in `dispatch'
    actionpack (3.2.7) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
    actionpack (3.2.7) lib/action_controller/metal.rb:246:in `block in action'
    actionpack (3.2.7) lib/action_dispatch/routing/route_set.rb:73:in `call'
    actionpack (3.2.7) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
    actionpack (3.2.7) lib/action_dispatch/routing/route_set.rb:36:in `call'
    journey (1.0.4) lib/journey/router.rb:68:in `block in call'
    journey (1.0.4) lib/journey/router.rb:56:in `each'
    journey (1.0.4) lib/journey/router.rb:56:in `call'
    actionpack (3.2.7) lib/action_dispatch/routing/route_set.rb:600:in `call'
    actionpack (3.2.7) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
    rack (1.4.1) lib/rack/etag.rb:23:in `call'
    rack (1.4.1) lib/rack/conditionalget.rb:25:in `call'
    actionpack (3.2.7) lib/action_dispatch/middleware/head.rb:14:in `call'
    actionpack (3.2.7) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
    actionpack (3.2.7) lib/action_dispatch/middleware/flash.rb:242:in `call'
    rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
    rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
    actionpack (3.2.7) lib/action_dispatch/middleware/cookies.rb:338:in `call'
    activerecord (3.2.7) lib/active_record/query_cache.rb:64:in `call'
    activerecord (3.2.7) lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'
    actionpack (3.2.7) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
    activesupport (3.2.7) lib/active_support/callbacks.rb:405:in `_run__821701562__call__524177637__callbacks'
    activesupport (3.2.7) lib/active_support/callbacks.rb:405:in `__run_callback'
    activesupport (3.2.7) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
    activesupport (3.2.7) lib/active_support/callbacks.rb:81:in `run_callbacks'
    actionpack (3.2.7) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
    actionpack (3.2.7) lib/action_dispatch/middleware/reloader.rb:65:in `call'
    actionpack (3.2.7) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
    actionpack (3.2.7) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
    actionpack (3.2.7) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
    railties (3.2.7) lib/rails/rack/logger.rb:26:in `call_app'
    railties (3.2.7) lib/rails/rack/logger.rb:16:in `call'
    actionpack (3.2.7) lib/action_dispatch/middleware/request_id.rb:22:in `call'
    rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
    rack (1.4.1) lib/rack/runtime.rb:17:in `call'
    activesupport (3.2.7) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
    rack (1.4.1) lib/rack/lock.rb:15:in `call'
    actionpack (3.2.7) lib/action_dispatch/middleware/static.rb:62:in `call'
    railties (3.2.7) lib/rails/engine.rb:479:in `call'
    railties (3.2.7) lib/rails/application.rb:220:in `call'
    rack (1.4.1) lib/rack/content_length.rb:14:in `call'
    railties (3.2.7) lib/rails/rack/log_tailer.rb:17:in `call'
    rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
    /home/victor/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
    /home/victor/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
    /home/victor/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
    
  • #4 楼 @huacnlee log 显示如下:

    Started GET "/" for 127.0.0.1 at 2012-11-03 11:21:47 +0800
    Connecting to database specified by database.yml
    Processing by PostsController#index as HTML
      Mainboard Load (0.6ms)  SELECT `mainboards`.* FROM `mainboards` 
      Post Load (0.4ms)  SELECT `posts`.* FROM `posts` ORDER BY created_at desc LIMIT 10 OFFSET 0
      Rendered posts/index.html.erb within layouts/application (52.5ms)
    Completed 500 Internal Server Error in 224ms
    
    ActionView::Template::Error (undefined method `gsub' for nil:NilClass):
        3: <% @posts.each do |post| %>
        4:     <div class="post-line">
        5:       <div class="title">
        6:       <%= link_to post.title, post %>
        7:       </div>
        8:       <div class="info">
        9:         由<a href="/users/<%= post.user_id %>"><%= User.find(post.user_id).username %></a>发布于<%= post.created_at %> |
      app/views/posts/index.html.erb:6:in `block in _app_views_posts_index_html_erb___578724762_89298580'
      app/views/posts/index.html.erb:3:in `_app_views_posts_index_html_erb___578724762_89298580'
      app/controllers/posts_controller.rb:12:in `index'
    
    
      Rendered /home/victor/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.7/lib/action_dispatch/middleware/templates/rescues/_trace.erb (6.0ms)
      Rendered /home/victor/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.7/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.0ms)
      Rendered /home/victor/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.7/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (14.2ms)
    
  • 怎么发现的

  • 能不能提供其他的账户登录呢 比如微博,github 等等