Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
Renny
@rennyallen
会员
第 26688 位会员 / 2016-05-24

[email protected]
成都
13 篇帖子 / 124 条回帖
23 关注者
30 正在关注
39 收藏
好好学习,天天撸码…
打赏作者
GitHub Public Repos
  • omniauth-feishu 11

    OmniAuth strategy for Feishu

  • openai_ruby 4

    A Ruby wrapper for OpenAI API

  • font-converter 4

    A Ruby wrapper for FontForge

  • renny_ren 3

    my blog

  • action-chat 2

    ActionChat is a simple chatroom application built with ActionCable and React

  • ai-chat 1

    AI chat application based on ChatGPT built with Rails and React

  • request.js 0

  • renny-ren 0

    Config files for my GitHub profile.

  • dialog 0

    React Dialog

  • material-tailwind 0

    @material-tailwind is an easy-to-use components library for Tailwind CSS and Material Design.

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • RubyConf China 2017 讲师和主题介绍 at 2017年06月14日

    支持!期待!

  • Ruby + GTK 3 实现经典小游戏,坦克大战 at 2017年06月14日

    赞👍,楼主头像挺好看的,Sapphire

  • 瞎琢磨一个多月的 Rails,求指导 at 2017年06月10日

    有同感,感觉东西越学越多😂

    不过不要急,慢慢来,一个一个地学,每天有一点进步就好,循序渐进。

    折腾三五个月后你就会发现,

    要学的东西还是很多 :)

  • 量产型炮灰工程师 at 2017年06月10日

    简历配色挺好的,有个性,赞一个

  • 杭州求个初级 Rails 的工作 at 2017年06月07日

    为什么首页有个滚动的地方不能直接用滚轮,只有点滚动条才能滚动。

  • 量产型炮灰工程师 at 2017年05月24日

    世界上有三种人:1-爱评判世界的人 2-去理解世界的人 3-努力改变世界的人。希望我们不要在第一阶段耗费太多精力,这不是程序员该有的状态。

    从个人角度讲,觉得适合自己的,就去做吧,哪来那么多对错,后果自己承担。

    大学教育也好,培训也好,自学也好,自己的未来自己选择,自己负责。

  • 用 method chain 方式来包装 HTTP API 调用 at 2017年05月08日

    我只是来顶贴的,赞一个~

  • RuCaptcha 2.0.0 验证码 Gem 发布,不需要依赖 ImageMagick 啦! at 2017年04月30日

    @huacnlee 按说明配置好后,在 http://localhost:3000/rucaptcha/ 这里调试

    出现 RuntimeError (Could not find cache store adapter for mem_cache_store (cannot load such file -- dalli)):

    我加入 gem 'dalli' 之后 bundle 验证码是能正常显示出来了,可是看到日志里有个错误:

    Started GET "/rucaptcha/" for ::1 at 2017-04-30 12:21:25 +0800
    Processing by RuCaptcha::CaptchaController#index as HTML
    Dalli::Server#connect localhost:11211
    localhost:11211 failed (count: 2) Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 11211
    localhost:11211 is still down (for 9.548 seconds now)
      RuCaptcha   RuCaptcha sh: convert: command not found
      Rendering text template
      Rendered text template (0.0ms)
    Sent data  (0.8ms)
    Completed 200 OK in 16ms (Views: 0.6ms | ActiveRecord: 0.0ms)
    

    貌似连接被拒绝?我看了 rubychina 的 gemfile,于是我又加了 gem 'kgio',然后错误如下:

    Started GET "/rucaptcha/" for ::1 at 2017-04-30 12:32:17 +0800
    Processing by RuCaptcha::CaptchaController#index as HTML
    Dalli::Server#connect localhost:11211
    localhost:11211 failed (count: 2) Errno::EINVAL: Invalid argument - setsockopt(2)
    localhost:11211 is still down (for 5.050 seconds now)
      RuCaptcha   RuCaptcha sh: convert: command not found
      Rendering text template
      Rendered text template (0.0ms)
    Sent data  (0.7ms)
    Completed 200 OK in 26ms (Views: 0.5ms | ActiveRecord: 0.0ms)
    

    这是我的 config/initializers/rucaptcha.rb:

    RuCaptcha.configure do
      self.cache_store = [:mem_cache_store, '127.0.0.1']
    end
    

    我的 Gemfile:

    gem 'devise'
    gem 'rucaptcha', '>=2.1.3'
    gem 'dalli'
    gem 'kgio'
    

    我配合 devise 来做验证,现在遇到的问题是,验证码图片是能正常显示的,但verify_rucaptcha?永远返回的是 false,即使验证码输对了也是 (如下图一图二)。看了服务器日志,所以怀疑是以上这个问题导致的。查了半天也没解决,这个是 cache 的问题吗?

    我不知道需不需要加kgio这个 gem(看 rubychina 的 gemfile 写的),但如果不加gem 'dalli'的话验证码显示不出来。

    图一

    图二

    更新(已解决)

    看了下ChangeLog发现不需要手动配置了,默认用的是 file_store,于是我直接把 rucaptcha.rb 删了就正常了。

    但是"file_store is still not a good way", 而手动配置 mem_cache_store 就会出现上面的错误,不知这是为什么呢

  • Ruby 工作经验零,求一份 Ruby 兼职开发或者 Ruby 兼职讲师的工作 at 2017年04月24日

    哈哈,看这段文字风格就猜到是花姐了

  • 头像更新尝试上传文本文件,显示"更新成功" at 2017年04月11日

    解决方法就是不要传 txt

  • 多说即将关闭了,有神马替代方案吗 at 2017年04月08日

    换畅言吧

  • RubyConf China 2017 什么时候 什么地点,期待! at 2017年02月16日

    感觉 Conf 2016 才过去没多久啊。

  • 在 Aliyun ECS 上用 Nginx + Passenger 部署 Rails 应用时安装 Passenger 的问题 at 2017年02月16日

    #1 楼 @darkbaby123 👍 你的方法完美解决了我的问题,真的太感谢你了! 回想起来,之前试了其他的 apt 源也是全部不能用,只有阿里云的能够用,应该就是被限制了,但一直没找到解决方法。

    I really appreciate u that ur solution fixed my problem perfectly and it works! It reminds me that I have tried many other apt repositories before, but no one works, except Aliyun. So it should be restricted but i cannot find any solution until saw your reply.

  • 这属于没受到尊重吗? at 2017年02月08日

    #4 楼 @xiaobai2 赞同,我觉得这和个人的性格有关。但都无可非议,不用想太多,一切都是为了更好的机会。

  • 从本周三 (2月8日) 起每周三晚八点直播 Rebuilding Rails at 2017年02月08日

    必须围观~

  • 新人求教操作 excel 的写法 at 2017年01月24日

    可以用spreadsheet,先读取这个单元格的数据,判断如果不满 1500 就写入 1500

  • Rails 中的抽象类 (abstract_class) 到底是什么意思? at 2017年01月13日

    @hiveer STI = Single Table Inheritance 单表继承

  • 别用 raw 和 html_safe at 2017年01月13日

    看完这篇文章又涨姿势了👍

  • 被我遗忘的 Hash#dig at 2017年01月13日

    get!👏

  • Rubinius 正在成为 Ruby 的方言 at 2017年01月11日

    Over time, Rubinius has changed from using C to using C++, changed the way primitives are implemented, rewritten the bytecode compiler, changed the bytecode interpreter execution model from stackless to using the C stack, changed the way exceptions are handled, added a custom JIT compiler, and replaced that with an LLVM-based one–just to name a few things.

    感觉 Rubinius 一直在努力改变,希望最终能成为一门地道的方言,与 Ruby 能够互补,没有冲突各有用途~

  • 游戏学编程 at 2017年01月11日

    👍 It's a good learning method, fun & relaxed.

  • 不选择 Markdown 的理由 at 2017年01月11日

    @Rei 链接挂了,可以更新一下吗,想看一看

  • 那些降低数据库性能的 Rails 风格 (Common Rails Idioms that Kill Database Performance) at 2017年01月10日

    @xiaoronglv 对,我想作者举这个例子主要是为了展示 postgre 的 explain 这个功能吧

  • 那些降低数据库性能的 Rails 风格 (Common Rails Idioms that Kill Database Performance) at 2017年01月10日

    @hemengzhi88 确实有的地方翻译我很纠结,有点生硬。还是英文原文比较 nice.

  • 那些降低数据库性能的 Rails 风格 (Common Rails Idioms that Kill Database Performance) at 2017年01月09日

    @oth So rapid reply!

  • 社区里谁有成功的建站经验 (pv>1000)?是依赖什么成功的? at 2017年01月09日

    做做 SEO,再推广营销一下,PV1000 还是很容易的

  • 什么是软件技术框架,软件技术框架图是怎么画的 at 2017年01月05日

    用笔画的

  • 分析 Ruby 中的比较函数 at 2017年01月04日

    blank 和 empty 可以简单理解为“空白的”和“空的”,比如含有一个空格的字符串" "是空白的 (blank),但它不是空的 (empty)

  • 翻译了一篇文章《GPU Animation: Doing It Right》| GPU 动画的正确打开方式,一起看看,谢请指点 at 2017年01月04日

    不错,翻译得很专业👍

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