- 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
--------+----------------------+----------+---------
$ bin/psql -d test
psql (17devel)
Type "help" for help.
test=# \d
List of relations
Schema | Name | Type | Owner
--------+----------------------+----------+---------
#!/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')
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
$ 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への対応が必要になる
git config --global user.name "Your Real Name"
git config --global user.email me@example.com
ulimit -n 10240
in ~/.zshrc or whatever/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install libyaml
git clone git@github.com:rails/rails.git
mutex_m | |
drb | |
base64 | |
git grep 'require "observer"' | |
git grep 'require "drb"' | |
git grep 'require "abbrev"' | |
git grep 'require "observer"' | |
git grep 'require "getoptlong"' |
tiup playground nightly | |
ssh -L 127.0.0.1:3306127.0.0.1:4000 -N 127.0.0.1 | |
mysql --comments --host 127.0.0.1 --port 4000 -u root | |
CREATE USER 'rails'@'localhost'; | |
GRANT ALL PRIVILEGES ON activerecord_unittest.* |
% bundle exec rake test_mysql2 | |
/Users/yahonda/.rbenv/versions/3.2.2/bin/ruby -w -I"lib:test" /Users/yahonda/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb "test/cases/active_record_schema_test.rb" "test/cases/adapter_prevent_writes_test.rb" "test/cases/adapter_test.rb" "test/cases/aggregations_test.rb" "test/cases/annotate_test.rb" "test/cases/arel/attributes/attribute_test.rb" "test/cases/arel/attributes/math_test.rb" "test/cases/arel/attributes_test.rb" "test/cases/arel/collectors/bind_test.rb" "test/cases/arel/collectors/composite_test.rb" "test/cases/arel/collectors/sql_string_test.rb" "test/cases/arel/collectors/substitute_bind_collector_test.rb" "test/cases/arel/crud_test.rb" "test/cases/arel/delete_manager_test.rb" "test/cases/arel/factory_methods_test.rb" "test/cases/arel/insert_manager_test.rb" "test/cases/arel/nodes/and_test.rb" "test/cases/arel/nodes/as_test.rb" "test/cases/arel/nodes/ascending_test.rb" "test/cases/arel/nodes/bin_test.rb" "test/cases/arel/no |
$ RUBY_IMAGE=ruby:3.2 docker-compose -f .buildkite/docker-compose.yml build base && CI=1 docker-compose -f .buildkite/docker-compose.yml run -e PRE_STEPS -e RACK --rm actionview runner actionview 'rake test:ujs' | |
Building base | |
Sending build context to Docker daemon 1.716GB | |
Step 1/22 : ARG RUBY_IMAGE | |
Step 2/22 : FROM ${RUBY_IMAGE:-ruby:latest} | |
3.2: Pulling from library/ruby | |
bba7bb10d5ba: Pull complete | |
ec2b820b8e87: Pull complete | |
284f2345db05: Pull complete | |
fea23129f080: Pull complete |