Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
Eric-Guo
@ericguo
VIP
NO. 1665 / 2012-03-31

[email protected]
天华建筑设计
上海
45 Topics / 1372 Replies
180 Followers
244 Following
74 Favorites
选Ruby是符合我爱钱爱金爱宝石气质的…
GitHub Public Repos
  • wechat 1326

    API, command and message handling for WeChat in Rails

  • wechat-starter 351

    WeChat web app with wx_pay in rails

  • tailwindcss-jit-stimulus 19

    A template with Rails 7.1, Shakapacker 7.2, TailwindCSS 3 and Stimulus 3.0

  • coreui4-rails-starter 12

    The CoreUI 4 Rails starter

  • pgac_demo 11

    Rails 7.1 Action Cable chat room using AnyCable as backend

  • product_hunt 5

    Demonstrate new Rails 5.1 feature: Assets on Yarn, System tests with Capybara and unified form_wi...

  • openproject 2

    OpenProject is the leading open source project management software.

  • dify-ruby-sdk 2

  • rails 1

    Ruby on Rails

  • homeland 1

    :circus_tent: An open source forum/community system based on Rails, developed based on Ruby China.

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at April 20, 2014

    一般不需要用 therubyracer,除非你用 less,默认不需要就是为啥注释掉的原因,你可以装一个node.js 作为 javascript 运行时环境。

  • 快速搭建 Gitosis 服务器望指点.? at April 19, 2014

    二楼正解,gitosis 被 gitolite 代替了,gitolite 被 gitlab 代替的,所以新建服务还是直接 gitlab 吧。

  • Simple Form 终完美支持 Bootstrap 3 at April 19, 2014

    simple_form 虽然叫 simple_form,实际上一点都不 simple,太多要记的用法,所以我用了一段时间后还是回归 rails 自带的 helper 了。。

  • 关于使用 net-ssh gem 将文件上传问题 at April 19, 2014

    要不绕一下?用 bash 和 scp 命令算了?前面是坑我们除了跳,还可以绕。。

    #/bin/bash
    bzip2 -kf ../server/db/time_inout.sqlite3
    scp -i ~/.ssh/server_id_rsa ../server/db/time_inout.sqlite3.bz2 user@hostname:server/db/time_inout.sqlite3.bz2
    ssh -i ~/.ssh/server_id_rsa user@hostname 'bunzip2 -f ~/server/db/time_inout.sqlite3.bz2'
    
  • 想在毕 at April 15, 2014

    做的很不错啦!比我当年强多了。

  • [上海][2014年4月15日] 四月周中聚会 at April 15, 2014

    四十二楼被占了。。。

  • RJS 有什么明显的危害么? at April 13, 2014

    好像升级到 4.1,get 返回 RJS 也是安全的了:

    class ApplicationController < ActionController::Base
      # Prevent CSRF attacks by raising an exception.
      # For APIs, you may want to use :null_session instead.
      protect_from_forgery with: :exception
    end
    

    For Rails 4.1: https://github.com/rails/rails/pull/13345

    Since we don't know the response format until rendering, it's simplest to use an after_action to verify that we aren't serving JS to a non-XHR GET request.

    This piggybacks on the same protect_from_forgery declarations that apps already use, so they'll transparently get protection without changing anything.

    Apps that intentionally expose JavaScript responses (like third-party widgets, per-customer API embeds, etc) will need to exclude those actions using existing protect_from_forgery API.

    Thanks everyone for the (long) discussion and thanks to Egor for the initial report - months ago now! - and this reminder.

  • RJS 有什么明显的危害么? at April 13, 2014

    讨论好长。。。 反正我经常用,好像不要用在 get 的时候返回 RJS 就好了?

  • Virtus vs ActiveModel 应该选哪个? at April 13, 2014

    #1 楼 @leekelby 那就要用active_attr?

  • 请推荐个适合 rails 的 Admin Template at April 13, 2014

    买来的 CSS 和 JS 是压缩?那就意味着无需修改只要写 HTML 啊,因为压缩的就是不让你改啊!

  • Github 登录不上去了啊?,挂代理也出现错误. at April 12, 2014

    试了,可以,开了 2 step verify,没有用代理。

  • Rails 4.1.0 正式发布了…… at April 09, 2014

    刚升级,发现rake test:all下面的 controller test 会测试 render 出来的 HTML 标记的是否闭合了!

  • 什么时候使用 Concerns,什么时候使用 Services? at April 05, 2014

    推荐这篇:7 Patterns to Refactor Fat ActiveRecord Models 中文版

  • Announcing TypeScript 1.0 at April 03, 2014

    目测 Rails 社区里 TypeScript 多半火不起来。连 server 端语言咱都玩的是动态类型,web 端会有人容忍一个静态类型安全语言?

  • 这个是什么版本有的写法,感觉不错 at March 29, 2014

    #1 楼 @besfan 2.0.0 一样支持。

  • [上海] VMware 招聘 Senior software Engineer-backend (Linux + Ruby) at March 27, 2014

    #9 楼 @iBachue ruby+.Net 这组合适合我!

  • rails 使用 bootstrap 出错 at March 23, 2014

    #13 楼 @317583395 这样其实不好,不 rails way,呵呵。。

  • rails 使用 bootstrap 出错 at March 23, 2014

    解了,PR,先顺手升级所有 gems 到最新版,然后开始准备解,发现就好了。。。

  • rails 使用 bootstrap 出错 at March 23, 2014

    读一下bootstrap-sass的 readme?或者给个 git 的源码地址? 单纯看报错看不出啥问题。。

  • 想用 Ruby 连接 oracle 数据库执行 Sql 语句,各位请问有推荐的好方法吗? at March 22, 2014

    不用那么烦吧,oci8 足以。

    require 'oci8'
    
    conn=OCI8.new('username','password','DB')
    
    co_la_sql = """
    SELECT co.containername, la.stdmrgebatch
    FROM container co
    INNER JOIN a_scheduledata sd on sd.scheduledataid=co.scheduledataid
    INNER JOIN a_lotattributes la ON la.containerid=co.containerid
    WHERE co.batchno IS NULL AND la.stdmrgebatch IS NOT NULL
      AND la.stdmrgebatch like 'M%'
    """
    
    containernames   = []
    stdmrgebatch = []
    conn.exec(co_la_sql) do |r|
        containernames << r[0]
        stdmrgebatch << r[1]
    end
    
    containernames.each_with_index do |id, i|
        sql = "UPDATE container co SET co.batchno='#{stdmrgebatch[i]}', co.changecount=co.changecount+1 WHERE co.containername IN ('#{id}')"
        puts sql + ";\n"
        num_rows = conn.exec(sql)
        puts "#{num_rows} rows updated."
    end
    
    conn.exec "commit"
    conn.logoff
    
    
    
  • 好可爱! at March 21, 2014

    这腿好内八。。

  • 目前使用 rails 的主流版本是多少? at March 18, 2014

    ruby-2.0.0-p451, rails 4.0.4 & 3.2.17

  • 使用 oci8 调用存储过程返回值总是 1?急! at March 18, 2014

    调用 Oracle procedure 你应该用ruby-plsql这个 gem,而不是直接用 ruby-oci8

  • 国内有什么基于 Rails 开发的开源 OA 系统? at March 12, 2014

    #10 楼 @Cifer_Y 做 MES 8 年的飘过。。。

  • 做好战斗准备再加入创业团队 at March 08, 2014

    #36 楼 @azhao 正解!

  • ruby 怎么一直往下降呀! at March 07, 2014

    这排行榜的公司绝对弯微软,只要是微软系的都上升!

  • Rails 死活连不上 Postgresql at March 06, 2014

    另外随便查了下文档,如果报 could not create any TCP/IP sockets,可以改/etc/postgresql/9.3/main/postgresql.conf换个端口试试 (比如 port 改为 5433)。

  • Rails 死活连不上 Postgresql at March 06, 2014

    我没用过cubian,我只能说 ubuntu 12.04 的 pg 缺省源安装肯定可以启动的。。

    如果你默认安装 pg,啥都不改,然后不能启动,这可能是一个发行版的 bug。。

  • 大家用过优酷的上传视频 api 吗 at March 06, 2014

    开两个贴问一个问题真的很不礼貌哦。。

  • Rails 死活连不上 Postgresql at March 06, 2014

    host: localhost改host: 10.0.0.5试试?

    其实不建议改任何 postgresql 设置,默认本机 unix socket 侦听是最安全的。

    然后 rails 里面这样配,不用 host 和 password 的。。

    production:
      adapter: postgresql
      encoding: unicode
      database: sanmate_prd
      port: 5433
      pool: 5
      username: sanmate
    
  • Prev
  • 1
  • 2
  • …
  • 26
  • 27
  • 28
  • 29
  • 30
  • …
  • 43
  • 44
  • Next
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English