gpt4 book ai didi

ruby-on-rails - 无法在我全新的 Mac OS X Lion 10.7.3 上安装 Rails

转载 作者:数据小太阳 更新时间:2023-10-29 08:05:26 25 4
gpt4 key购买 nike

刚买了一台新的 macbook pro,我在安装 rails 时遇到了麻烦..我已经安装了 ruby​​ 1.8.7,当我尝试编写“gem install rails”时,我得到:

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

我还尝试安装更高版本的 ruby​​,它说:

    Nirs-MacBook-Pro:~ nirohayon$ rvm install 1.9.3
Fetching yaml-0.1.4.tar.gz to /Users/nirohayon/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/nirohayon/.rvm/src
Configuring yaml in /Users/nirohayon/.rvm/src/yaml-0.1.4.
Error running ' ./configure --prefix="/Users/nirohayon/.rvm/usr" ', please read /Users/nirohayon/.rvm/log/ruby-1.9.3-p125/yaml/configure.log
Compiling yaml in /Users/nirohayon/.rvm/src/yaml-0.1.4.
Error running 'make ', please read /Users/nirohayon/.rvm/log/ruby-1.9.3-p125/yaml/make.log


Database file /Users/nirohayon/.rvm/config/packages does not exist.

Installing Ruby from source to: /Users/nirohayon/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)...

ruby-1.9.3-p125 - #fetching
ruby-1.9.3-p125 - #extracted to /Users/nirohayon/.rvm/src/ruby-1.9.3-p125 (already extracted)
ruby-1.9.3-p125 - #configuring
Error running ' ./configure --prefix=/Users/nirohayon/.rvm/rubies/ruby-1.9.3-p125 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/nirohayon/.rvm/usr ', please read /Users/nirohayon/.rvm/log/ruby-1.9.3-p125/configure.log
There has been an error while running configure. Halting the installation.
ls: /Users/nirohayon/.rvm/rubies/*/bin/ruby: No such file or directory

请帮助我,我以前使用过 Windows 并且对 Rails 也很陌生,所以我不太了解我应该引导我的终端的路径。我需要一步一步的解释来安装 rails 并在我的 Mac 上站立。

非常感谢!尼尔

最佳答案

您对 RVM 的使用看起来很像您没有安装开发者工具。从 App Store 获取 XCode,安装命令行工具!

如果你真的想在平台提供的ruby上安装rails,你需要做的就是sudo gem install rails,因为你需要使用管理员权限来安装系统gemset中的gems .

关于ruby-on-rails - 无法在我全新的 Mac OS X Lion 10.7.3 上安装 Rails,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10192121/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com