Skip to content

Apple Silicon (ARM Mac) + macOS 15 で開発環境を動くように修正#324

Merged
nay merged 1 commit intodev_3_1_3from
fix/apple-silicon-dev-env
Mar 20, 2026
Merged

Apple Silicon (ARM Mac) + macOS 15 で開発環境を動くように修正#324
nay merged 1 commit intodev_3_1_3from
fix/apple-silicon-dev-env

Conversation

@nay
Copy link
Copy Markdown
Owner

@nay nay commented Mar 20, 2026

Summary

Apple Silicon Mac + macOS 15 環境で bundle install が失敗する問題を修正し、開発環境が動くようにした。

変更内容

変更 理由
libv8 を Gemfile から削除 ARM Mac でビルド不可。webpacker + Node.js があるため JS ランタイムとして不要
therubyracer を Gemfile から削除 同上(libv8 に依存)
pg~> 0.18~> 1.5.0 に更新 macOS 15 の Clang が関数ポインタ型不一致をエラーにするため、古い pg 0.21 がビルド不可
nio4r が 2.5.8 → 2.7.5 に更新(自動) 同上
package.json の Node 制約を "16.x"">= 16" に緩和 Node 16 以外の環境でも yarn install できるように

注意事項

  • Node 17 以降を使う場合、webpack 4 の OpenSSL 互換性の問題により NODE_OPTIONS=--openssl-legacy-provider の設定が必要。~/.zshrc 等に export NODE_OPTIONS=--openssl-legacy-provider を追加しておくと楽
  • rails s 前にアセットのコンパイルが必要:
    yarn install
    bundle exec rails webpacker:compile
    
  • テストDB未作成の場合は bundle exec rails db:migrate RAILS_ENV=test で構築(db:schema:load は schema.rb が MySQL 形式のため使えない)
  • この OpenSSL 問題は Rails 7.0 移行時に webpacker を廃止すれば解消される見込み

Test plan

  • bundle install が成功する
  • rails s でアプリが起動する
  • bundle exec rspec 全426テスト通過(0 failures)

@nay nay force-pushed the fix/apple-silicon-dev-env branch from 338419c to b911ef1 Compare March 20, 2026 07:01
@nay nay merged commit c8a753e into dev_3_1_3 Mar 20, 2026
@nay nay mentioned this pull request Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant