memo.log

技術情報の雑なメモ

2023-04-01から1ヶ月間の記事一覧

Amazon Linux2でCDKのリポジトリをクローンしてきてビルドする手順メモ

sudo yum -y update sudo yum -y install git git clone https://github.com/aws/aws-cdk.git curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash nvm install v16.20.0 npm install -g yarn yarn install NODE_OPTIONS="--m…

【Render】デプロイ時に `ActiveRecord::Encryption::Errors::Configuration (key_derivation_salt is not configured. Please configure it via credential active_record_encryption.key_derivation_salt or by setting config.active_record.encryption.key_derivation_salt):`

zenn.dev の通り、 bin/rails db:encryption:init EDITOR=vi bin/rails credentials:edit --environment production

【Render】【Rails】デプロイ時に"validate_secret_key_base': Missing `secret_key_base` for 'production' environment, set this string with `bin/rails credentials:edit` (ArgumentError)"

どうやら以下の通りらしい。 oknm.jp シークレットを生成して、環境変数 SECRET_KEY_BASE に登録したら通った。

Dockerやdocker composeでPostgreSQL立てて、psql で接続するサンプルメモ

前提: WSL(Ubuntu 20.04) サーバー側 Docker パスワードは testtest ポートは 5432 sudo docker run -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=testtest postgres docker compose docker-compose.yml を用意 こっちは `root ユーザー yaml:docker-…

Enumerable とか Enumerator のメモ

Enumerableモジュールの場合 class Test include Enumerable end test = Test.new pp test.respond_to?(:map) # true pp test.respond_to?(:each) # false ####### class AlphabetCollection include Enumerable def initialize @elements = ["a", "b", "c"]…

Rubyでトリボナッチ数列

gist.github.com www.enjoy.ne.jp