Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
mixbo
@lb563
VIP
NO. 257 / 2011-11-24

Longbridge
成都
127 Topics / 434 Replies
2 Followers
2 Following
26 Favorites
技术来源于积累,知识重于分享。
GitHub Public Repos
  • nuxt-seo-meta 44

    Help Nuxt create seo metadata easy

  • javascript-questions 2

    A long list of (advanced) JavaScript questions, and their explanations :sparkles:

  • freeCodeCamp 1

    freeCodeCamp.org's open-source codebase and curriculum. Learn to code for free.

  • content 0

    The content behind MDN Web Docs

  • gpui-component 0

    A UI components write in GPUI.

  • zed 0

    Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creato...

  • vscode 0

    Visual Studio Code

  • open-webui 0

    User-friendly WebUI for LLMs (Formerly Ollama WebUI)

  • chatgpt-on-wechat 0

    基于大模型搭建的聊天机器人,同时支持 企业微信、微信 公众号、飞书、钉钉 等接入,可选择GPT3.5/GPT4.0/Claude/文心一言/讯飞星火/通义千问/Gemini/GLM-4/Clau...

  • openapi-website 0

    Longbridge OpenAPI website

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 还是澳洲狠,对 IE7 收税 at June 15, 2012

    对用户的我来说,谁好用就用什么,对开发者的我来说,满足用户所需是必然的。

  • 各位是因为什么事件和原因接触到 Ruby at June 15, 2012

    还未毕业,幸运的被老师推荐到北京创业公司实习,于是开始了使用 ruby 工作之旅。

  • Jing.fm 感觉这个网站真的很赞啊~ at June 15, 2012

    这个体验很不错啊。不过个人还是喜欢虾米。

  • Ruby China for Android 新版本 at June 13, 2012

    @huacnlee 太好了。不用在网页上浏览了.大谢

  • 你是这样的程序员吗 at June 10, 2012

    目前 "ruby" 暂时未影响我的生活,但是很大程度上影响了我的工作。呵呵

  • 请教建个人网站的问题 at June 10, 2012

    #2 楼 @Rei 学习了

  • 怎样根据权限角色的不同,显示不同的内容 at June 08, 2012

    是的,我现在也用类似的方法来处理这种需求。

  • 我们的产品上线啦 -- pragmatic.ly at June 08, 2012

    #45 楼 @poshboytl 弱弱的问一句,你们从哪里取得我的头像信息?貌似我就注册我的邮箱并没有写其它的信息,没有上传图片。难道从 "https://en.gravatar.com" ?

  • 是否应该开个新手专区呢?近来新手问题似乎越来越多了 at June 06, 2012

    #4 楼 @huacnlee 这个提议不错。特别是"让被 5 个人喜欢过的新手问题贴可以回到首页显示"

  • 在 mac 下搭建 nginx+passenger+rails 出错 at June 05, 2012

    #2 楼 @tomwey 还有就是重装 Passengener 和 Nginx

  • Rails 服务启动的判定方法 at June 05, 2012

    没有明白你的意思。

  • 关于 submit 跳转 网页 at June 04, 2012

    #7 楼 顶起@kevinhua 呵呵。我来做实验:

    [2] pry(main)> require "activesupport"
    => true
    [3] pry(main)> "love".pluralize
    => "loves"
    
  • 在 mac 下搭建 nginx+passenger+rails 出错 at June 04, 2012

    我处理的方法是:

    [deploy@dell02 ~]$ whereis ruby
    ruby: /usr/bin/ruby /opt/ruby/bin/ruby
    

    然后把其中的路径写到:passenger_ruby

    你可以试一试: passenger_ruby /usr/bin/ruby

  • 关于 rails 路由 at June 03, 2012

    同问"默认网站"是什么? 是显示的 public/index.html 这个文件的内容么? 说具体点吧。

  • 菜鸟求助:初学者需要把代码都弄清楚吗? at June 01, 2012

    个人觉得,现在看不懂就不停的反复的看,总会从中学到点什么。

  • 和父亲,毕竟还是有冲突的 at May 31, 2012

    #31 楼 @tiemei兄 @zw963 说的对啊。我们还年轻不怕得。

  • 如何禁止 #to_json 方法对中文的 escape at May 31, 2012

    我一般是这个样子用的: gsub(/\\u([0-9a-z]{4})/){|s| [$1.to_i(16)].pack("U")}

    下面是测试的例子:

    o = {:name=>"米乐游戏",:age=>1}
    => {:name=>"米乐游戏", :age=>1}
    [26] pry(main)> o.to_json
    => "{\"name\":\"\\u7c73\\u4e50\\u6e38\\u620f\",\"age\":1}"
    [27] pry(main)> o.to_json.gsub(/\\u([0-9a-z]{4})/){|s| [$1.to_i(16)].pack("U")}
    => "{\"name\":\"米乐游戏\",\"age\":1}"
    [28] pry(main)> 
    
    
    
  • 求助 关于 pry 的使用 at May 31, 2012

    #5 楼 @hexawing 有时候忘记了这些命令怎么拼写的,就用 tab 键来提示,tab 键会列出相关的命令例如:

    [1] pry(main)> w
    warn      when      whereami  while 
    
  • 求助 关于 pry 的使用 at May 31, 2012

    使用命令:whereami

  • 有什么办法可以让 MongoDB 在 Mac OS X 下开机启动 at May 27, 2012

    是的,建议 mac 用户都用这个东东。太方便了

  • 麻烦各位技术前辈分享下各自经常浏览的技术博客:) at May 27, 2012

    好吧,我承认我没有理解你的意思。呵呵

  • 麻烦各位技术前辈分享下各自经常浏览的技术博客:) at May 27, 2012

    想起来了。你可以到:http://ruby-china.org/sites 技术博客 类找到你要的牛人

  • Firefox 下 UI 还需改进呀? at May 27, 2012

    同志,最好是给个截图什么的。

  • 麻烦各位技术前辈分享下各自经常浏览的技术博客:) at May 27, 2012

    经常上 ruby-china 算不算?呵呵

  • 装 passenger 执行 passenger-install-nginx-module 报错 at May 26, 2012

    你项目文件中找不到 Rakefile 这句话说的很清楚:

    No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

    你查一下看是否有这个文件在你的项目中. 或者多给点信息给大家

  • 疑问:to_sql 不能用在 controller 中,而只能用在 view 和 console 中? at May 25, 2012

    #2 楼 @qqerqqer 可以尝试修改代码为:

    def index
        @users= User.scoped
        flash[:notice] = @users.to_sql
    end
    

    具体可以参考:http://erniemiller.org/2010/05/11/activerecord-relation-vs-arel/

    ruby-head > Article.scoped.class
    => ActiveRecord::Relation 
    
  • 哪个 rails3 的开源项目适合新手参考学习 at May 25, 2012

    还是官方的教程好 具体点的你就看"web 敏捷开发第四版" 从最简单的开始。

  • 疑问:to_sql 不能用在 controller 中,而只能用在 view 和 console 中? at May 25, 2012

    你确定你的@users是 relation 对象,能多给点描述信息最好。

  • Ruby China 5 月 份在 UpYun 上面的流量情况,给大家一点参考 at May 25, 2012

    #1 楼 @congteng +1

  • 关于 gem mysql2 的使用问题 at May 25, 2012

    只是 require 一个 mysql2 ? 我也是 ruby 1.9.3,我这边是 ok 的,你应该给多点信息

    require "mysql2"
    require "active_record"
    # 数据库名,ip,数据库用户名,数据库对应用户名的密码
    def connect_db(*args)
    
         db = args[0] 
         ip = args[1] || "127.0.0.1"
         user = args[2] || "root"
         password =  args[3] || ""
         ActiveRecord::Base.establish_connection(
          :adapter  => "mysql2",
          :database => db,
          :encoding => "utf8",
          :port     => 3306,
          :host     => ip,
          :username => user,
          :password => password,
        )
    end
    
    
    
  • Prev
  • 1
  • 2
  • …
  • 7
  • 8
  • 9
  • 10
  • 11
  • …
  • 14
  • 15
  • Next
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English