Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
msl12
@msl12
会员
第 25144 位会员 / 2016-02-24

57 篇帖子 / 372 条回帖
10 关注者
0 正在关注
0 收藏
nil
未设置 GitHub 信息。
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 如何清除片段缓存呢? at 2016年06月03日

    #12 楼 @hging

    直接清除所有的 cache 不太好吧..

  • 如何清除片段缓存呢? at 2016年06月03日

    #10 楼 @xiaoronglv

    看了,知道了缓存会过期清除,但是还是不懂怎么在没过期前清除它..

  • 如何清除片段缓存呢? at 2016年06月03日

    #8 楼 @small_fish__

    因为这个缓存我是这样写的: <% cache("#{CACHE_PREFIX}/layout/right", :expires_in => 1.day) do %> 它检测不到是否有内容更新

  • 如何清除片段缓存呢? at 2016年06月03日

    #6 楼 @hw676018683 但是不能等到过期时间才清呀

  • 如何清除片段缓存呢? at 2016年06月02日

    之所以要清除片段缓存,是因为我有个右边栏的‘热门文章’、‘最新评论’的设计

    一有文章发布或有评论则删除右边栏 _right.html 里的片段缓存,然后重新建立新的缓存

    我的 cache 语句是这样的,写在开头: <% cache("#{CACHE_PREFIX}/layout/right", :expires_in => 1.day) do %>

  • 如何清除片段缓存呢? at 2016年06月02日

    等等等---

    求教。

  • 如何清除片段缓存呢? at 2016年06月02日

    比如说我的片段缓存地址是 views/LOL/layout/right/22e88d0ae992a3655ac6bd7ca224fc78

    有什么方法,在我知道缓存是在 views/LOL/layout/right/ 下面的情况下,清理这一缓存?

  • 如何清除片段缓存呢? at 2016年06月02日

    #1 楼 @huacnlee 那如果要删除的话,该怎么办呢?

  • 关于 second_level_cache 插件的 prefix at 2016年06月01日

    #1 楼 @hooopo 谢谢哈,明白一些了

  • Puma 的相关资料为啥我觉得那么少? at 2016年05月26日

    我也觉得少,相对于 passenger 少太多了

  • [杭州] App 招聘开发人员 at 2016年05月12日

    哇塞,人气好高啊😄

  • 部署到生产模式的问题 at 2016年05月11日

    迫不得已也设置了config.assets.compile = true

    Did anybody fix it?

  • form_for 无法指定 id 的问题 at 2016年04月29日

    #1 楼 @davidwei 成功了,谢谢~!👍

  • 上线 Ruby 安装包镜像 - cache.ruby-china.org at 2016年04月20日

    👏

  • ActiveRecord 用 bulk_insert 来批量插入数据,提高效率 at 2016年04月20日

    666666 👍

  • 你们有没有遇到过这种问题"undefined method `cast_type' for"? at 2016年04月19日

    #2 楼 @huacnlee 好吧,我研究下 ruby-china 怎么解决这个问题的

  • 你们有没有遇到过这种问题"undefined method `cast_type' for"? at 2016年04月19日

    先暂时换回原来的 rails 4.2 用着先.. 😢

  • 写关注功能结果出现一个问题 at 2016年04月19日

    #11 楼 @huacnlee 谢谢,我看看

  • 写关注功能结果出现一个问题 at 2016年04月17日

    #9 楼 @huobazi 我也觉得

  • 写关注功能结果出现一个问题 at 2016年04月17日

    #6 楼 @jasl 原来如此啊,那我修改一下

  • 写关注功能结果出现一个问题 at 2016年04月16日

    顶下

  • 写关注功能结果出现一个问题 at 2016年04月16日

    #2 楼 @huacnlee 你是说那个事务处理不要那样写吗

  • 写关注功能结果出现一个问题 at 2016年04月16日

    #2 楼 @huacnlee 蛤?什么意思..

  • 写关注功能结果出现一个问题 at 2016年04月16日

    log 文件里好像也是表示没有更新到 follower_ids

    Started POST "/test/follow" for 127.0.0.1 at 2016-04-16 17:05:15 +0800
    Processing by UsersController#follow as HTML
      Parameters: {"id"=>"test"}
      User Load (0.5ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1  ORDER BY "users"."id" ASC LIMIT 1  [["id", 9]]
       (0.1ms)  BEGIN
      User Exists (0.4ms)  SELECT  1 AS one FROM "users" WHERE ("users"."name" = 'msl' AND "users"."id" != 9) LIMIT 1
      SQL (0.4ms)  UPDATE "users" SET "following_ids" = $1, "updated_at" = $2 WHERE "users"."id" = $3  [["following_ids", "{1,6}"], ["updated_at", "2016-04-16 09:05:15.507663"], ["id", 9]]
      User Exists (0.3ms)  SELECT  1 AS one FROM "users" WHERE ("users"."name" = 'test' AND "users"."id" != 6) LIMIT 1
       (16.7ms)  COMMIT
    Redirected to http://localhost:3000/test
    Completed 302 Found in 37ms (ActiveRecord: 18.5ms)
    
  • 使用 gem 插件'notifications'后出现的一个小问题 at 2016年04月16日

    #5 楼 @imconfused 你这么一说,噢,好像知道了什么了

  • 使用 gem 插件'notifications'后出现的一个小问题 at 2016年04月16日

    #3 楼 @ken 不会吧?只是‘/notifications’这个页面才会出现这个情况哦

  • 使用 gem 插件'notifications'后出现的一个小问题 at 2016年04月16日

    不明白为什么,routes 文件里面是已经有root to: 'welcome#index' 了

  • 使用 gem 插件'notifications'后出现的一个小问题 at 2016年04月16日
    Started GET "/notifications" for 127.0.0.1 at 2016-04-16 13:57:08 +0800
    Processing by Notifications::NotificationsController#index as HTML
      User Load (0.2ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1  ORDER BY "users"."id" ASC LIMIT 1  [["id", 9]]
      Notification Load (0.4ms)  SELECT  "notifications".* FROM "notifications" WHERE "notifications"."user_id" = $1  ORDER BY id desc LIMIT 20 OFFSET 0  [["user_id", 9]]
      Rendered notifications/notifications/index.html.erb within layouts/application (4.9ms)
    Completed 500 Internal Server Error in 128ms (ActiveRecord: 0.6ms)
    
    ActionView::Template::Error (undefined local variable or method `root_path' for #<#<Class:0x007f3740d9c348>:0x007f37410efd88>):
        17: <% else %>
        18: <%= user_name_tag(current_user) %>(管理员)<% end %>
        19: <%= link_to '首页', root_path %>
        20: <%= link_to '编辑资料', edit_user_registration_path %>
        21: <% if admin? %>
        22: <%= link_to '撰写公告', edit_announcement_path %>
        23: <% end %>
      app/views/layouts/application.html.erb:20:in `_app_views_layouts_application_html_erb__959845113685053431_69937645716180'
    
    
  • 新的通知功能上线 - 基于 notifications 这个 Rails Engine gem at 2016年04月16日

    不过不知道为什么在我的 shell 里运行这句代码时:

    rails g notifications:install
    

    会出现这个:

    Adding Homeland initializer (config/initializers/notifications.rb)...
          create  config/initializers/notifications.rb
    Adding model (notification.rb)...
          create  app/models/notification.rb
    Error: Command 'notifications:install:migrations' not recognized
    Did you mean: `$ rake notifications:install:migrations` ?
    
    Usage: rails COMMAND [ARGS]
    
    The most common rails commands are:
     generate    Generate new code (short-cut alias: "g")
     console     Start the Rails console (short-cut alias: "c")
     server      Start the Rails server (short-cut alias: "s")
     dbconsole   Start a console for the database specified in config/database.yml
                 (short-cut alias: "db")
     new         Create a new Rails application. "rails new my_app" creates a
                 new application called MyApp in "./my_app"
    
    In addition to those, there are:
     destroy      Undo code generated with "generate" (short-cut alias: "d")
     plugin new   Generates skeleton for developing a Rails plugin
     runner       Run a piece of code in the application environment (short-cut alias: "r")
    
    All commands can be run with -h (or --help) for more information.
    
  • 新的通知功能上线 - 基于 notifications 这个 Rails Engine gem at 2016年04月16日

    猴赛雷👍

  • 上一页
  • 1
  • 2
  • …
  • 9
  • 10
  • 11
  • 12
  • 下一页
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English