/rails/activerecord/lib/arel/collectors/composite.rb:28: warning: the block passed to 'Arel::Collectors::Bind#add_bind' defined at /rails/activerecord/lib/arel/collectors/bind.rb:16 may be ignored
/rails/activesupport/lib/active_support/testing/strict_warnings.rb:35:in 'ActiveSupport::RaiseWarnings#warn': /rails/activerecord/lib/arel/collectors/composite.rb:28: warning: the block passed to 'Arel::Collectors::Bind#add_bind' defined at /rails/activerecord/lib/arel/collectors/bind.rb:16 may be ignored (ActiveSupport::RaiseWarnings::WarningError)
from /rails/activerecord/lib/arel/collectors/composite.rb:28:in 'Arel::Collectors::Composite#add_bind'
from /rails/activerecord/lib/arel/visitors/to_sql.rb:761:in 'Arel::Visitors::ToSql#visit_Arel_Nodes_BindParam'
from /rails/activerecord/lib/arel/visitors/visitor.rb:30:in 'Arel::Visitors::Visitor#visit'
from /rails/activerecord/lib/arel/visitors/to_sql.rb:654:in 'Arel::Visitors::ToSql#visit_Arel_Nodes_Equality'
from /rails/activerecord/lib/arel/visitors/vis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class C | |
class_eval "def throw_syntax_error; eval %( | |
'abc' + pluralize 'def' | |
); end", "lib/file.rb", 42 | |
end | |
c = C.new | |
c.throw_syntax_error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ruby -v | |
ruby 3.4.0dev (2024-09-10T02:50:49Z master 3db2782748) [x86_64-linux] | |
``` | |
$ bundle | |
Fetching gem metadata from https://rubygems.org/......... | |
Resolving dependencies... | |
Fetching stringio 3.1.1 | |
Using sqlite3 2.0.4 (was 2.0.0) |
- Run non prepared statement using psql
$ bin/psql -d test
psql (17devel)
Type "help" for help.
test=# \d
List of relations
Schema | Name | Type | Owner
--------+----------------------+----------+---------
- Create ruby_pg.rb that uses https://github.com/ged/ruby-pg . Ruby on Rails depends on it.
#!/usr/bin/env ruby
require 'pg'
# Output a table of current connections to the DB
conn = PG.connect( dbname: 'test' )
conn.exec('DROP TABLE IF EXISTS posts')
- active_record2_non_prepared.rb that disables prepared statement
prepared_statements: false
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
This entry shows the test result of https://www.postgresql.org/message-id/flat/CA%2Bq6zcWtUbT_Sxj0V6HY6EZ89uv5wuG5aefpe_9n0Jr3VwntFg%40mail.gmail.com
- Download these 4 patch files
$ wget https://www.postgresql.org/message-id/attachment/154675/v18-0001-Prevent-jumbling-of-every-element-in-ArrayExpr.patch
$ wget https://www.postgresql.org/message-id/attachment/154676/v18-0002-Reusable-decimalLength-functions.patch
$ wget https://www.postgresql.org/message-id/attachment/154677/v18-0003-Merge-constants-in-ArrayExpr-into-groups.patch
RailsのRuby masterブランチでのCIについて複数回聞かれたのでメモしておきます。
-
Rails main branch
7.2.0.alpha
で Ruby 3.1.0 を要求するようになった rails/rails#50491 -
従来はメジャーバージョンが変わる時だけrequired_ruby_versionをあげていた(https://github.com/byroot/rails/commit/6487836af8f50648a9b30ce61864c827132e5592 )が、そのルールだとRails 7.2ですでにEOLになっているRuby 2.7への対応が必要になる
- macOS Software Update
- Install Xcode
-
git config --global user.name "Your Real Name"
git config --global user.email me@example.com
- Connecting to GitHub with SSH
-
ulimit -n 10240
in ~/.zshrc or whatever - Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install libyaml for Ruby 3.2
brew install libyaml
- Install Ruby 3.2
-
git clone git@github.com:rails/rails.git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutex_m | |
drb | |
base64 | |
git grep 'require "observer"' | |
git grep 'require "drb"' | |
git grep 'require "abbrev"' | |
git grep 'require "observer"' | |
git grep 'require "getoptlong"' |
NewerOlder