试图在轨道上安装红宝石

问题描述 投票:0回答:1

我正在尝试使用gem install rails安装滑轨,但尝试时会得到

ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.

所以我尝试使用sudo gem install rails并得到

ERROR:  Error installing rails:
ERROR: Failed to build gem native extension.

我已经检查了互联网,并说应该安装RVM,但是当我尝试这样做时,它会告诉我:

Error running './configure --prefix=/Users/manhattan/.rvm/rubies/ruby-2.7.0 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/libksba:/usr/local/opt/readline:/usr/local/opt/zlib:/usr/local/opt/[email protected] --disable-install-doc --enable-shared', please read /Users/manhattan/.rvm/log/1589107425_ruby-2.7.0/configure.log There has been an error while running configure. Halting the installation.

有人可以帮我吗。

ruby-on-rails
1个回答
0
投票

您可以更改正在使用的目录的权限

# chmod -R 777 DIR_NAME
# cd DIR_NAME
# gem install rails
© www.soinside.com 2019 - 2024. All rights reserved.