Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
riki
@rikiwong
会员
第 24553 位会员 / 2016-01-12

[email protected]
北京
0 篇帖子 / 44 条回帖
0 关注者
0 正在关注
8 收藏
GitHub Public Repos
  • stable-diffusion-webui 0

    Stable Diffusion web UI

  • WechatBot 0

  • ws 0

    Simple to use, blazing fast and thoroughly tested WebSocket client and server for Node.js

  • yhm 0

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • gem therubyracer 和 libv8 的安装问题 at 2016年04月20日

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

  • 用 3 行写一个漂亮点的 表达含义 “我开心就好” 的代码 at 2016年04月16日
    puts '我开心就好'
    puts '我开心就好'
    puts '我开心就好'
    
  • 给初学者推荐一本书 at 2016年04月03日

    #5 @adamshen 3l delete 了

  • mac 上安装 therubyracer -v '0.12.2' 安装问题 at 2016年04月03日

    今天我也遇到了这个问题,解决方法

    brew tap homebrew/versions
    brew install v8-315
    
    gem install libv8 -v '3.16.14.13' -- --with-system-v8
    gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
    
    bundle install
    
  • 给初学者推荐一本书 at 2016年03月29日

    成功治好了我的颈椎病

  • rails s 和 gem mysql2 错误 at 2016年03月11日

    gem uninstall mysql2 gem install mysql2 可能会解决这个问题

  • [北京] 微饭科技招聘 Rails 2 人 (10k-20k) at 2016年03月10日

    已投简历,期望回复

  • [北京] 轻客智能科技有限责任公司招聘 Ruby 工程师 at 2016年03月10日

    已投简历,期望回复

  • [请教] update_attributes! 这里的感叹号是起什么作用? at 2016年02月26日

    #8 楼 @jsoner 1l 的说明我重新编辑了一下。

  • [请教] update_attributes! 这里的感叹号是起什么作用? at 2016年02月26日

    #8 楼 @jsoner 修改完了

  • [请教] update_attributes! 这里的感叹号是起什么作用? at 2016年02月26日

    save 和 save! 的区别在于,save! 保存失败会抛出异常,save 保存失败结果是 false。你的问题不太清楚

    def save(*)
      create_or_update
    rescue ActiveRecord::RecordInvalid
      false
    end
    
    # File activerecord/lib/active_record/persistence.rb, line 141
    def save!(*)
      create_or_update || raise(RecordNotSaved.new("Failed to save the record", self))
    end
    
    # File activerecord/lib/active_record/persistence.rb, line 260
    def update!(attributes)
      # The following transaction covers any possible database side-effects of the
      # attributes assignment. For example, setting the IDs of a child collection.
      with_transaction_returning_status do
        assign_attributes(attributes)
        save!
      end
    end
    

    update! 调用了 save! 方法,如果保存失败 save! 方法会抛出异常,如果有说明错误的地方请指正。

  • [结束] 送几本《Docker 即学即用》 at 2016年02月19日

    [email protected]

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