Skip to main content

M1 MacでRails環境を作る

M1 Macになって初めてRailsの環境を作ろうと思った
久々のRailsなので、その差分とM1のエラーを解消したのでそれを記載


・Could not find a valid gem ‘bunlder
gem update –system
で解決する
https://mebee.info/2020/03/25/post-6770/
> RubyGems(gemコマンド)自体のバージョンアップをする
https://qiita.com/tatama/items/4e9d6bb8bfa2d9556db7

 

・Your bundle is locked to mimemagic (0.3.5), but that version could not be found
以下のバージョンにアップデートする
>Rails 5.2.5 / 6.0.3.6 / 6.1.3.1
https://hackmd.io/@mametter/mimemagic-info-ja

 

・特定のパッケージのみアップデートする
bundle update rails
をすればrailsだけあげれる
https://qiita.com/toshi_dev/items/84869dce53372a52f752

 

・An error occurred while installing ffi (1.12.2)
以下のコマンドの実行で解消
> gem install ffi -v ‘1.15.5’ — –with-cflags=-Wno-implicit-function-declaration
https://stackoverflow.com/questions/73031300/cant-install-ffi-v-1-12-2-on-mac-os-monterey

 

・An error occurred while installing libv8 (7.3.492.27.1), and Bundler
mini_racerを消せば解消する

 

・symbol not found in flat namespace (_ffi_prep_closure)
ffi 1.12.2
にあげれば解消する
https://github.com/ffi/ffi/issues/946

 

関連記事:

Pocket