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

[email protected]
天华建筑设计
上海
46 Topics / 1382 Replies
181 Followers
245 Following
74 Favorites
选Ruby是符合我爱钱爱金爱宝石气质的…
GitHub Public Repos
  • wechat 1331

    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

  • pgac_demo 13

    Rails 7.2 Action Cable chat room using AnyCable as backend

  • coreui4-rails-starter 12

    The CoreUI 4 Rails starter

  • 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

  • homeland 1

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

  • ruby 1

    The Ruby Programming Language [mirror]

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

    #26 楼 @xautjzd 如果编译安装 passenger,配置文件默认在/opt/nginx/conf/,你看到的配置文件都是之前的。。

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at April 20, 2014

    #24 楼 @xautjzd 看起来你快爬出坑了,现在就缺解决权限问题了,无论如何,欢迎来到 Ruby 的世界。。

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at April 20, 2014

    #15 楼 @xautjzd 其实目前 rails 最佳部署环境是 Ubuntu 12.04 LTS。。。

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at April 20, 2014

    #16 楼 @xautjzd passenger?不是一找一大把么?。。

    In Phusion Passenger 4, using SetEnv and PassEnv in Apache and env in Nginx works as expected. Detailed information can be found in the Phusion Passenger manual, section “About environment variables”.

    http://blog.phusion.nl/2008/12/16/passing-environment-variables-to-ruby-from-phusion-passenger/

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at April 20, 2014

    #15 楼 @xautjzd sudo su -成为 root 先。。。

  • Rails AES 加密后用 php 解密不了 at April 20, 2014

    #1 楼 @night_song 赞!这个解答我要记下来!

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at April 20, 2014

    #9 楼 @xautjzd 先删掉 ngingx-passenger,然后通过gem install passenger && passenger-install-nginx-module 安装 passenger,然后再做文档的步骤。

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at April 20, 2014

    这是同一台机器么。。。啥操作系统?Ubuntu 照理不会发生这样的情况啊。。

  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at April 20, 2014

    #4 楼 @xautjzd 可是明明是 1.8 的目录。。

    5   /usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/utils.rb     326     in `prepare_app_process'
    
  • Gemfile syntax error compile error on line 19: syntax error, unexpected ':', expecting $end gem 'therubyracer', platforms: :ruby ^ (Bundler::GemfileError) at April 20, 2014

    访问了你的主页,你的 ruby 版本太低,升到 ruby 2.0.0 p 451 应该就可以解决问题,另外 passenger 的版本也太低,现在早已是 4.0.41 版本啦!

  • 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
    
    
    
  • Prev
  • 1
  • 2
  • …
  • 26
  • 27
  • 28
  • 29
  • 30
  • …
  • 44
  • 45
  • Next
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English