尝试安装 rails,但出现错误 "i386 architecture is deprecated on macOS."
Trying to install rails, but I get the error "i386 architecture is deprecated on macOS."
最重要的一行,对于我未经训练的人来说,似乎是:ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
但是我真的应该修改 Xcode 构建设置吗?
我正在尝试 $ sudo gem install rails
。
我的规格:
macOS High Sierra 10.13.6
Xcode 版本:10.0 (10A255)
Ruby 版本:2.3.7p456
Gem版本:2.7.8
目前我找到的建议:
1) 安装 xcode 命令行工具。它们已安装。
2) bundle config build.nokogiri --use-system-libraries
.
/\ 我读过我不应该这样做。
如有任何帮助,我们将不胜感激!
如@anothermh 所述,您不应使用系统 ruby。我还要进一步指出,您不想也不应该 运行 sudo
安装 gems。
使用 ruby 版本管理器,例如 asdf(我推荐)、rvm(可能是最受欢迎的之一)或 rbenv(也是不错的选择)。
我还建议,如果您还没有这样做,请获取自制软件,因为您需要一些依赖项。强烈推荐至少:
brew install gcc libxml2 readline
我尝试过捆绑安装,但遇到了这样的问题。在我的例子中,从 4.2.5 升级 rails。到 4.2.9 修复错误。也许它会帮助某人不要浪费时间。
最重要的一行,对于我未经训练的人来说,似乎是:ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
但是我真的应该修改 Xcode 构建设置吗?
我正在尝试 $ sudo gem install rails
。
我的规格:
macOS High Sierra 10.13.6
Xcode 版本:10.0 (10A255)
Ruby 版本:2.3.7p456
Gem版本:2.7.8
目前我找到的建议:
1) 安装 xcode 命令行工具。它们已安装。
2) bundle config build.nokogiri --use-system-libraries
.
/\ 我读过我不应该这样做。
如有任何帮助,我们将不胜感激!
如@anothermh 所述,您不应使用系统 ruby。我还要进一步指出,您不想也不应该 运行 sudo
安装 gems。
使用 ruby 版本管理器,例如 asdf(我推荐)、rvm(可能是最受欢迎的之一)或 rbenv(也是不错的选择)。
我还建议,如果您还没有这样做,请获取自制软件,因为您需要一些依赖项。强烈推荐至少:
brew install gcc libxml2 readline
我尝试过捆绑安装,但遇到了这样的问题。在我的例子中,从 4.2.5 升级 rails。到 4.2.9 修复错误。也许它会帮助某人不要浪费时间。