Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
李华顺
@huacnlee
管理员
第 2 位会员 / 2011-10-28

[email protected]
长桥证券 (Longbridge)
成都
502 篇帖子 / 9058 条回帖
959 关注者
53 正在关注
105 收藏
打赏作者
GitHub Public Repos
  • autocorrect 1412

    A linter and formatter to help you to improve copywriting, correct spaces, words, and punctuation...

  • rails-settings-cached 1104

    Global settings for your Rails application.

  • rucaptcha 697

    Captcha Gem for Rails, which generates captcha image by Rust.

  • zed-theme-macos-classic 97

    A macOS native style theme for Zed, let it same like native app in macOS.

  • vscode-macos-classic.t... 22

    macOS Classic theme for Visual Studio Code

  • zed-extension-action 19

    GitHub Action for automatically bump Zed Extensions version after a release.

  • autocorrect-action 11

    GitHub action for use AutoCorrect as lint

  • zed-autocorrect 6

    AutoCorrect for Zed

  • gpui-workspace 4

    Dock layout UI component for GPUI, that extracted from Zed project.

  • zed-lalrpop 3

    LALRPOP parser grammar support for Zed.

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 让你的 Vim 更加高效和强大 - SpaceVim at 2016年12月29日

    这个又是什么?不是同一个人么?

    https://ruby-china.org/topics/31834

  • Rails 新建 model 的时候报错 uninitialized constant ActiveSupport::EventedFileUpdateChecker at 2016年12月28日

    #2 楼 @xiaobai2 关注本地文件更新,重新载入代码的

  • Rails 新建 model 的时候报错 uninitialized constant ActiveSupport::EventedFileUpdateChecker at 2016年12月28日

    你 rails new 一个新项目出来,看看新出来的 config/environments/development.rb 里面是否有这么一行,如果没有,去掉你项目里面的。

  • 最近几天,网站一直无法打开 at 2016年12月28日

    #11 楼 @luoyegufei 你的系统时间不正确呀!

    这样你访问其他 https 的网站也会有相同的问题

  • 最近几天,网站一直无法打开 at 2016年12月28日

    #9 楼 @luoyegufei 你用 Chrome 可以么?Firefox 什么版本?

  • 最近几天,网站一直无法打开 at 2016年12月28日

    #6 楼 @huobazi ruby-china.org 的证书是正确的呀

  • 函数名容易与变量名冲突 at 2016年12月27日
    • 有作用域和优先级的
    • 变量名冲突的问题是习惯导致的,和命名风格没关系,你可以有很多方式避免
    • 实际的使用场景中,我们时常可能会故意声明一个和变量(或 attr)名称相同的函数,这是 Ruby 的特性例如:
    class Foo
      attr_accessor :name
    
      def name
        return 'None' if @name.blank?
        @name
      end
    end
    
  • jbuilder vs active_model_serializers at 2016年12月27日

    其实在我看来 active_modal_serializer 和 jbuilder 都没什么大问题,只是各自表现方式不同,但 jbuilder 能随着 Rails 组的管理获得更快的新版本支持,为何不用呢?

    当然 jbuilder 我也是第一次用,不知道会不会有其他的问题,只是目前看起来没什么明显的问题,也挺好用的,从 active_modal_serializer 已有的代码重构也几下就弄好了。

    哦,jbuilder 内建类似 ActionView 那种 fragment_cache 的哦,这点用起来很舒服。

    而 active_modal_serializer 的 cache 写法到现在我还没搞太明白,好像是有点小问题没搞透

  • jbuilder vs active_model_serializers at 2016年12月27日

    此外,实际使用来看 active_modal_serializer 在描述 JSON 结构的时候不清晰(我的感觉)

    外加这次这么选 是看到 active_modal_serializer 居然来在依赖 json 1.8 而这个时候 json 2.0.1 都出来了,说明维护不是太勤

    大家有没有发现最近 Ruby China 项目的替换,都是尽可能的采用 Rails 的默认方案,目的就一个,减少不必要的依赖,用 Rails 的主厨精选:

    • message_bus - ActionCable
    • Grape - ActionController::API
    • active_modal_serializer - jbuilder
  • jbuilder vs active_model_serializers at 2016年12月27日

    jbuilder 是 Rails 官方维护的,还有 DHH 参与,Basecamp 也在用,改用它能更快接上 Rails 最新版本

  • 最近几天,网站一直无法打开 at 2016年12月26日

    我刚刚调整了一下配置,请大家帮忙测试一下呢

  • 最近几天,网站一直无法打开 at 2016年12月26日

    https://ruby-china.org/topics/32000

  • 最近几天,网站一直无法打开 at 2016年12月26日

    看起来是 HTTP/2 启用后,SSL 的 ssl_ciphers 参数不合理导致的

    最近调整的:https://ruby-china.org/topics/31983

  • 使用 acme.sh 给 Nginx 安装 Let’ s Encrypt 提供的免费 SSL 证书 at 2016年12月23日

    #3 楼 @samport 更新了一下,少了 ssl_prefer_server_ciphers 的配置

  • 网站实现 HTTP 和 HTTPS 同时访问并自动转换 at 2016年12月23日

    搞复杂了,Rails 里面启用 force_ssl 然后将 80 和 443 放到同一个 server block 里面,跳转的事情就搞定了。

    config/environments/production.rb

    # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
    config.force_ssl = true
    

    Nginx 配置:

    server {
      listen 80 default_server;
      listen 443 ssl;
      ...
    }
    
  • CentOS 7 下 Nginx 安装使用 Let’ s Encrypt 证书的完整过程 at 2016年12月23日

    https://github.com/Neilpang/acme.sh

    acme.sh 的方式更简单

  • CentOS 7 下 Nginx 安装使用 Let’ s Encrypt 证书的完整过程 at 2016年12月23日
    Building dependency tree       
    Reading state information... Done
    dialog is already the newest version.
    gcc is already the newest version.
    python is already the newest version.
    python-dev is already the newest version.
    augeas-lenses is already the newest version.
    ca-certificates is already the newest version.
    libaugeas0 is already the newest version.
    libffi-dev is already the newest version.
    libssl-dev is already the newest version.
    python-virtualenv is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 217 not upgraded.
    Creating virtual environment...
    Installing Python packages...
    

    靠 Installing Python packages... 一直不过去,貌似也是和 RubyGems 一样,pip 访问困难

  • 换了新手机,再也下载不到 Android 版 Ruby China App at 2016年12月22日

    翻墙!

  • 关于 Ruby 中接收用户输入参数的办法 at 2016年12月22日

    http://ruby-doc.org/stdlib-2.3.3/libdoc/optparse/rdoc/OptionParser.html

    演示

    # foo.rb
    require 'optparse'
    
    options = {}
    OptionParser.new do |opts|
      opts.banner = "Usage: example.rb [options]"
    
      opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
        options[:verbose] = v
      end
    end.parse!
    
    p options
    p ARGV
    
    $ ruby foo.rb -v
    
  • Passenger + Nginx 程序运行一段时间报错,没有找到具体的原因,求教 at 2016年12月22日

    对,如果你有 Sidekiq 或其他的服务的话,需要确保哪些服务的最大进程/线程数量是在 database.yml 配置这个 pool 之下的

  • Passenger + Nginx 程序运行一段时间报错,没有找到具体的原因,求教 at 2016年12月22日

    database.yml production 的配置呢?

  • Nginx 配置问题 (想要 https 和 http 都可以访问) at 2016年12月22日

    说清楚,你的问题是什么!!!

    整理好你贴上来的 Nginx 配置信息

  • 关于 Rails 4 和 Rails 5 差别大吗? at 2016年12月21日

    Rails 5 新功能介绍:

    https://ruby-china.org/topics/30422

  • 开源 Tower 的编辑器 Simditor at 2016年12月21日

    #83 楼 @zchar 已对他禁言

  • JetBrains 家新的 Golang IDE 开始接受内测申请 at 2016年12月21日

    其实 VS Code + gocode 已经非常好用了

  • [远程] 彩程招募 Rails 工程师 at 2016年12月21日

    这是要把国内顶尖 Ruby 工程师都收了的节奏啊

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