Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
Rei
@Rei
Admin
NO. 1 / 2011-10-28

[email protected]
深圳
182 Topics / 9130 Replies
727 Followers
0 Following
11 Favorites
中下水平 Rails 程序员
Reward
GitHub Public Repos
  • writings 940

    [Closed] Source code of writings.io

  • alipay 732

    Unofficial alipay ruby gem

  • code_campo 291

    [Closed] Source code of http://codecampo.com

  • asciidoctor-pdf-cjk-ka... 101

    **no longer maintained**

  • asciidoctor-htmlbook 31

    Asciidoctor HTMLBook is an Asciidoctor backend for converting AsciiDoc documents to HTMLBook docu...

  • material-ui 17

  • rich-text-editor 12

  • htmlrenderer 12

  • rails-chatgpt-demo 8

  • rails-app 7

    A Rails project template lets me start new projects quickly.

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • [上海][12.3,12.4] RubyConf China 2021 Hotwire 开始售票 at November 17, 2021

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

  • RubyConf China 2021 Hotwire 延期至 12.3-12.4 at November 17, 2021

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

  • RubyConf China 2021 Hotwire 延期至 12.3-12.4 at November 16, 2021

    改线上了,这两天出公告。

  • electron 是不是就是无头浏览器? at November 15, 2021

    无头浏览器指没有图形界面,直接执行脚本代码。electron 不属于这类。

    electron 作用是利用本地系统通知和获得访问文件权限,这两个现在浏览器也有 API 了。剩下的就是习惯问题,像 https://vscode.dev/ 已经在浏览器内实现了完整功能,看能不能习惯完全在浏览器内写代码。

  • rails 能通过 env 控制 routes 吗 at November 13, 2021

    去掉 do 就行了。

  • Error installing sinatra [已解决] at November 10, 2021

    从错误信息看从解包就出异常了,很可能是下载下来的包是坏文件。

  • Error installing sinatra [已解决] at November 10, 2021

    有可能网络问题。

  • 一台服务器部署多个项目 at November 02, 2021

    http://nginx.org/en/docs/http/server_names.html

    通过 server_name 指定不同域名对应不同应用。

  • Migrations are pending at October 31, 2021
    $ bin/rails -T | grep db
    rails db:create                          # Creates the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:create:all to create all databases in the config). Without RAILS_ENV or when RAILS_ENV is development, it defaults to creating the development and test databases, except when DATABASE_URL is present
    rails db:drop                            # Drops the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:drop:all to drop all databases in the config). Without RAILS_ENV or when RAILS_ENV is development, it defaults to dropping the development and test databases, except when DATABASE_URL is present
    rails db:environment:set                 # Set the environment value for the database
    rails db:fixtures:load                   # Loads fixtures into the current environment's database
    rails db:migrate                         # Migrate the database (options: VERSION=x, VERBOSE=false, SCOPE=blog)
    rails db:migrate:down                    # Runs the "down" for a given migration VERSION
    rails db:migrate:redo                    # Rolls back the database one migration and re-migrates up (options: STEP=x, VERSION=x)
    rails db:migrate:status                  # Display status of migrations
    rails db:migrate:up                      # Runs the "up" for a given migration VERSION
    rails db:prepare                         # Runs setup if database does not exist, or runs migrations if it does
    rails db:reset                           # Drops and recreates the database from db/schema.rb for the current environment and loads the seeds
    rails db:rollback                        # Rolls the schema back to the previous version (specify steps w/ STEP=n)
    rails db:schema:cache:clear              # Clears a db/schema_cache.yml file
    rails db:schema:cache:dump               # Creates a db/schema_cache.yml file
    rails db:schema:dump                     # Creates a database schema file (either db/schema.rb or db/structure.sql, depending on `config.active_record.schema_format`)
    rails db:schema:load                     # Loads a database schema file (either db/schema.rb or db/structure.sql, depending on `config.active_record.schema_format`) into the database
    rails db:seed                            # Loads the seed data from db/seeds.rb
    rails db:seed:replant                    # Truncates tables of each database for current environment and loads the seeds
    rails db:setup                           # Creates the database, loads the schema, and initializes with the seed data (use db:reset to also drop the database first)
    rails db:structure:dump                  # Dumps the database structure to db/structure.sql
    rails db:structure:load                  # Recreates the databases from the structure.sql file
    rails db:version                         # Retrieves the current schema version number
    rails test:db                            # Run tests quickly, but also reset db
    
  • 低代码是真火了,夸得官方都不好意思了 at October 26, 2021

    如果是推广产品就好好做个介绍,不是留个链接让大家猜你想表达什么。

  • 资安工具 gem: rack-attack at October 24, 2021

    跟随 Rails 版本升级,就不用太担心框架层面的漏洞。业务代码的漏洞强烈推荐 https://github.com/presidentbeef/brakeman 这个 gem,把它加到 CI 流程。

  • 资安工具 gem: rack-attack at October 23, 2021

    rack-attack 可以防比较简单的脚本攻击,例如不停的发贴。真遇到 ddos 攻击需要云服务的防火墙服务。

  • 现在学 Ruby 好,还是学 Go,在这里潜水十几年了 at October 23, 2021

    现在想学个语言能够自由去根据自己业务做定制开发

    按这个需求 Rails 好。跟着 Rails 全栈是最省心的。

  • M1 芯片的 macOS 搭建 Ruby on Rails 环境? at October 21, 2021

    docker

  • 1024 节,来测测你是哪款极客程序员? [集赞有礼品哦] at October 21, 2021

    卡池有没有 DHH 型的?

  • 大家对新发布的 mbp 有啥看法 at October 19, 2021

    超出预算。

  • Rust 微微框架 Vial at October 19, 2021

    用框架没必要把源码都看懂吧,也就出 bug 的时候会看一下是框架问题还是自己问题。

    Web 应用相当一部分在调外部接口,例如支付接口、错误收集、日志系统,如果用小众语言发现没有相应的 client 就要自己写了,很麻烦。(Ruby 在 Web 领域不是小众)

  • Rust 微微框架 Vial at October 19, 2021

    如果喜欢轻量级框架,应该试试 Sinatra,起码有 Stripe 在用,证明了生产环境可靠性。

    (主楼没必要把文档贴上来,太长影响回复)

  • RSA 公钥加密长度超出 at October 17, 2021

    那实际超出了没?

  • Foreman 是干什么的? 为什么不用 systemd ? at October 17, 2021

    不用,我用 ubuntu 镜像然后装源里面的 ruby。如果需要特定 ruby 版本就用 ruby 的镜像。

  • Foreman 是干什么的? 为什么不用 systemd ? at October 15, 2021

    现在开发环境已经需要四个进程,Rails,sidekiq,scss,esbuild,另开终端已经显得麻烦了。

    Rails css/js-buundling 默认用 foreman 启动开发进程,因为 foreman 是 Ruby gem。

    对我来说 docker 是更好的选择,开发环境用 docker compose,生产环境用 docekr swarm。

  • Foreman 是干什么的? 为什么不用 systemd ? at October 14, 2021

    foreman 是开发环境用的,作者曾经在 heroku 工作,所以 Profile 和 heroku 的格式一样。

    生产环境应该 export 到系统的管理配置,例如 upstart,stystemd http://ddollar.github.io/foreman/#EXPORT-FORMATS

    foreman 诞生的时候 systemd 还没成为主流。

  • 目前项目安装新的 gem 包后 bundle install 一直报错,“Could not verify the SSL certificate for https://gems.ruby-china.com/.”? at October 11, 2021

    清华源也是 lets encrypt 的,就新了 20 天,是不是有什么不同?

  • Rails Webpack 遇到了问题 at October 10, 2021

    信息不充足,把项目 push 到 GitHub 让看看源码。

    另外 webpacker 已经预定在下个版本移除,没必要现在学。如果要用 webpack 和 react 独立配置即可,不需要 webpakcer。 https://ruby-china.org/topics/41699

  • 目前项目安装新的 gem 包后 bundle install 一直报错,“Could not verify the SSL certificate for https://gems.ruby-china.com/.”? at October 09, 2021

    我是用官方源的,而且 Ruby 和系统都是比较新的应该不会遇到这个问题。

  • 目前项目安装新的 gem 包后 bundle install 一直报错,“Could not verify the SSL certificate for https://gems.ruby-china.com/.”? at October 08, 2021

    let's encrypt 的旧根证书过期,需要更新客户端 https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/

    尝试更新 rubygem,Ruby 版本或系统的 ca bundle。

  • proc 中可以改变外部变量的值吗? at October 04, 2021

    param = 200 给 param 赋予了一个新的 object,所以没有改变 count 的值。

    Integer 类型不能改变自身,要用一些可以改变自身的类型,例如 Hash 或者自己创建一个类:

    data = { count: 500 }
    
    proc = Proc.new { |params|
      params[:count] = 200
    }
    
    proc.call(data)
    
    puts data[:count]
    #=> 200
    
  • Heroku 对 Rails 7 的支持还挺快的 at September 30, 2021

    这是不正常的,先搞清楚目前在用什么机制,importmap 吗?

  • 在 block 中怎么访问到类的 attr_accessor ? at September 29, 2021

    app server 的多线程是为了提高并发,不然前一个请求完成之前,后面来的请求都要阻塞。

  • Heroku 对 Rails 7 的支持还挺快的 at September 29, 2021

    用 docker 就不用管 buildpack 支不支持了

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