Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
Jasl
@jasl
Admin
NO. 1107 / 2012-02-21

[email protected]
北京
126 Topics / 3955 Replies
396 Followers
11 Following
82 Favorites
Ass♂we♂can
GitHub Public Repos
  • wx_pay 461

    An unofficial simple wechat pay gem

  • zk_dcap_verifier_poc 1

  • substrate 0

    Substrate: The platform for blockchain innovators

  • parity-common 0

    Collection of crates used in Parity projects

  • polkadot-sdk 0

    The Parity Polkadot Blockchain SDK

  • pjs-rs 0

    A javascript runtime with pjs embebed

  • agave 0

    Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.

  • ngine 0

    A nostr application framework

  • derive_more 0

    Some more derive(Trait) options

  • cybros-experimental 0

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 有谁在 CentOS 上布署过 RoR 么? at February 09, 2013

    5.x 6.x 用 rvm 很顺利 注意添加 rpmforge 和 epel 源

  • 这种 JS 的产品分类效果,有什么控件吗?或者实现的原理! at February 07, 2013

    @xdite 重写了,thx

  • 这种 JS 的产品分类效果,有什么控件吗?或者实现的原理! at February 07, 2013

    @Rei thx

  • 这种 JS 的产品分类效果,有什么控件吗?或者实现的原理! at February 07, 2013

    @Rei 我曾经的实现是直接往 output_buffer 里写,这样呢? 如果要是这样不合适的话,那就采用 partial view 的方式了,要不 html 会比较乱

  • 这种 JS 的产品分类效果,有什么控件吗?或者实现的原理! at February 07, 2013

    @Rei 我是因为还有一些计算呵呵,放 helper 里理论性能高点

  • 这种 JS 的产品分类效果,有什么控件吗?或者实现的原理! at February 07, 2013

    很简单了。。一个 helper 的例子,代码有点乱

    def output_cities()
        p = request.query_parameters.to_hash
        p.delete "city"
    
        html = "<li>"+link_to("全部", providers_path(p), :class => "icon-all #{"cur" if params[:city].blank?}")+"</li>"
        CITIES.each do |k, v|
          html<< "<li>"+link_to(v[0], providers_path(p.merge("city" => k)), :class => "#{v[1]} #{"cur" if params[:city] == k}")+"</li>"
        end
        html.html_safe
      end
    
  • 用啥 Rich text editor? at February 07, 2013

    推荐百度的 ueditor 生成的 html 简洁,而且符合中国人的操作习惯,提供的表情等功能也很好,官网可以先定制再下载的。缺点的话是文档太烂,配置文件的注释比较混乱。

    kindeditor 曾经用,优点类似 ueditor,但是生成的 html 很脏,甚至有""=""这种情况,现在我已经把自己产品里的 kindeditor 都替换到了 ueditor ckeditor 功能很强,但操作比较复杂,很重,但是那个 gem 做的很完善 另外国外的 tinymce 也很强大,应该是最强大的了吧。。

    wysihtml5 推荐,但是他生成的 html 没有 p 标签(可能是我配置的问题),另外因为是 html5 的所以。。。不过还是值得推荐,小巧,强大,容易定制

  • 真心求教:unicorn 错误日志中的这种出错信息如何解决? at February 07, 2013

    @xhj6 可能吧,回头看一眼,不过我有 monit 内存超过一定阀值自动去重启

  • rails_kindeditor 的问题 at February 06, 2013

    rails_kindeditor 的附件部分做的不好,不喜欢 另外放弃 form_helper 不是明智的选择,我修改了那个 gem 的 helper https://github.com/jasl/start_up/blob/master/lib/form_helpers/kindeditor.rb 同时在页面需要引入https://github.com/jasl/start_up/blob/master/app/assets/javascripts/kindeditor.js.coffee

    <%- @comment ||= @post.comments.build -%>
    <%= form_for([@comment.commentable, @comment]) do |f| -%>
      <fieldset>
        <legend>Comment post</legend>
        <div class="row row-grid">
          <div class="span8 offset2">
            <%= print_error_messages @comment -%>
          </div>
        </div>
        <div class="control-group">
          <%= f.label :body, :class => 'control-label' -%>
          <div class="controls">
            <%= f.kindeditor :body, :height => 100, :items => %w(fontname fontsize | emoticons image link) %>
          </div>
        </div>
        <div class="form-actions" >
          <%= f.submit :class => 'btn btn-primary' -%>
        </div>
      </fieldset>
    <% end %>
    
  • 真心求教:unicorn 错误日志中的这种出错信息如何解决? at February 06, 2013

    给你一个参考的 unicorn 配置文件,你给的信息很少,所以只能说 配置有问题。。至于 nginx 报上游服务器超时,是因为 unicorn 启动失败导致的 https://github.com/jasl/start_up/blob/master/config/unicorn/production.rb 另,内存泄露一直是 ruby 的老毛病,所以 unicorn 默认是 30s 重启一次 worker

  • Paperclip 和 Carrierwave 哪个更好? at February 05, 2013

    @hooopo

    • filesize 可以在反向代理层进行 validate
    • 对 mini_magick 这方面不太清楚,早期读使用 paperclip 的 proj 依赖 rmagic 的也不少貌似
    • 保留原始文件这个我觉得和提倡软删除而不是硬删除一样,保留原始文件虽然不利于空间占用,但也可能会有好处
    • carrierwave 把 uploader 独立天然的 dry 了,而 paperclip 还需要通过 concern 方式手动去做一些
    • 社区维护这方面不太清楚

    所以,我觉得是两个完全不同的设计思路,各有优劣,看情况去使用就好,carrierwave 因为有 uploader 类,所以我可以在这个层面对一些内部的东西做 hack,效果也还可以

  • 学习 Ruby 过程中遇到了一个问题 at February 02, 2013

    ::是命名空间的分隔符啊 前面不加东西 则代表顶层的命名空间咯

  • rails 的确不是虚拟主机玩的, 我的 vps 内存耗尽死机了! at February 02, 2013

    linode 512 内存 centos 6.3+nginx+mysql+ruby 1.9.3+unicorn 方案,拖 redmine+gitlab+testing branch 完全无问题

  • 如何解决 stack level too deep (SystemStackError) 的问题 at February 02, 2013

    Ruby uses the C stack so your options include using ulimit or compiling Ruby with some compiler/linker stack size flag. Tail recursion is yet to be implemented and Ruby's current support for recursion isn't so great. As cool and elegant recursion is, you might want to consider coping with the language's limitations and writing your code in a different way.

    http://stackoverflow.com/questions/242617/how-to-increase-stack-size-for-a-ruby-app-recursive-app-getting-stack-level-to

  • 看来是惨遭裁员了。。 at February 02, 2013

    @iBachue 个人介绍更新的真快。。。。

  • Rails 工程师的薪资水平 at January 31, 2013

    @aisensiy 小学的时候打石器,注册了 N 个账号都不给我发确认邮件,于是胡按键盘就敲出 jasl。。然后就收到确认邮件,然后就一直用这个名字。。。其他人就不道了。。

  • 想搞一个新疆的 Ruby 线下活动 不知道有几个新疆的朋友 at January 30, 2013

    @lgn21st 切下去之后会场周围会不会窜出一群带刀青年。。。

  • 想搞一个新疆的 Ruby 线下活动 不知道有几个新疆的朋友 at January 30, 2013

    @lgn21st 今年的 rubyconfchina 纪念品就送切糕吧!

  • Rails 工程师的薪资水平 at January 30, 2013

    额 又一个 jasl....

  • 「真.瞎扯淡」站长,好号有木有 at January 29, 2013

    看来倒号有市场...

  • 同学们,你们是如何实现ORM的? at January 26, 2013

    orm 虽然是概念,但是 hibernate 明显不能实现的像 ar 优雅,这是语言决定的。 动态语言的 orm 可以通过查询外模式获得字段信息,hibernate 本能也这样但受限于 java 不能运行期修改类定义 所以 ar 的 orm 是和 db 直接相关的,migration 如本身意思迁移是提供一套 dsl 方便你操作数据库的定义

  • 想买 Railscasts Pro at January 26, 2013

    @google coupon 除了用作之前 30 个抽奖的 都是要分给各位 tutors 的 所以。。。以后有机会的啦 在北京的话,积极参加北京 ruby 社区的活动嗯,以后还会有

  • 想买 Railscasts Pro at January 25, 2013

    @riskgod 南狼同学是 railsgirls 的 tutor 所以本来就有他的啦。。。coupon 除了用作之前 30 个抽奖的 都是要分给各位 tutors 的 所以。。。以后有机会的啦

  • 北京的同学不妨去听听这个 at January 24, 2013

    @virgil ok 到时候见

  • 北京的同学不妨去听听这个 at January 24, 2013

    报名了 有谁同去么?

  • please use ansicon:http://adoxa.3eeweb.com/ansicon/ at January 24, 2013

    @chairy11 毕竟要把网站发布到互联网上,服务器还是要用 linux 的。。。所以无论如何都绕不过去,不如把 linux 使用当做学习 rails 的一部分,而且 linux 的 terminal 和 win 的命令行操作很相似啊

  • 想买 Railscasts Pro at January 24, 2013

    @southwolf No Problem

  • 如何添加文档到 Dash? at January 20, 2013

    http://kapeli.com/docsets/ 有讲如何生成 ruby gem 的话 可以gem server来查看 rdoc 虽然没有 dash 好用 当然这俩的前提是你要在安装 gem 的时候附带生成 rdoc

  • 大家对于"刚毕业"、“太年轻” 创业有什么看法? at January 20, 2013

    @magina 哦,那同样跟我无关了 - -

  • 基本上能给业界流行的开源源件提交 Patch,都会让人对你刮目相看。 at January 20, 2013

    @fredwu 你是我偶像。。。

  • Prev
  • 1
  • 2
  • …
  • 108
  • 109
  • 110
  • 111
  • 112
  • …
  • 120
  • 121
  • Next
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English