我一整天都在尝试这样做,但都无法成功。
目前卡在这个阶段,当我运行 bundle install 时,出现以下错误:
compiling cppjieba_rb.c
compiling internal.cc make: *** [internal.o] Error 1
make failed, exit code 2
安装 cppjieba_rb (0.4.4) 时出错,Bundler 无法继续。
我使用的是 M4 MacBook Pro。任何帮助都将不胜感激!
我一整天都在尝试这样做,但都无法成功。
目前卡在这个阶段,当我运行 bundle install 时,出现以下错误:
compiling cppjieba_rb.c
compiling internal.cc make: *** [internal.o] Error 1
make failed, exit code 2
安装 cppjieba_rb (0.4.4) 时出错,Bundler 无法继续。
我使用的是 M4 MacBook Pro。任何帮助都将不胜感激!
刚在重置过的 MacBook 上从零开始设置了一个开发环境。我尽可能地使用了 Homebrew。我并不是说这是最好的方法,但这是我的分步指南:
如果新安装的程序不显示,请在步骤中更新 shell source .zprofile
brew install git
brew install rbenv
rbenv install ruby 3.4.6
rbenv global 3.4.6
ruby --version
gem update
gem install rails
rails --version
brew install postgresql@14 pgvector
brew services start postgresql
brew install redis
brew services start redis
brew install nvm (有关 shell 配置文件调整,请参阅 nvm — Homebrew Formulae)
nvm --version
nvm install 22
node -v
brew install pnpm
与 OP 相同,从 克隆 Discourse 开始
Postgres 的安装似乎有点不稳定。显然,你可能会遇到损坏的文件,一种比较简单的处理方法是删除它们并重新安装:
brew uninstall postgresql@14
rm -rf /opt/homebrew/var/postgresql@14
brew install postgresql@14
brew services start postgresql@14