简体   繁体   English

El Capitan Ruby二进制文件安装问题

[英]El Capitan Ruby binaries installation issue

Just trying to get through some parts of the Hartl rails tutorial to familiarize myself with the rails framework. 只是试图通过Hartl rails教程的某些部分来熟悉Rails框架。 I have homebrew installed (removed and reinstalled it because it giving me trouble after using El Capitan), and got a fresh version of rvm with rvm get stable 我已经安装了自制软件(已删除并重新安装它,因为使用El Capitan后给我带来了麻烦),并获得了带有rvm get stable的rvm的新版本rvm get stable

I went into the directory containing the project, and I got this message 我进入了包含项目的目录,并收到了此消息

ruby-2.3.0-dev is not installed.
To install do: 'rvm install ruby-2.3.0-dev'

Previously, I'd tried using 2.3.0 as the latest version (it was the newest thing showing up when I ran rvm list , not sure why), but now I want to change that to 2.3.1. 以前,我尝试使用2.3.0作为最新版本(这是运行rvm list时显示的最新信息,不确定为什么),但现在我想将其更改为2.3.1。 Anybody know how I can change the ruby version for this project? 有人知道我如何更改该项目的红宝石版本吗?

Additionally, when I run rvm install ruby-2.3.1 , I get this error 另外,当我运行rvm install ruby-2.3.1 ,出现此错误

No binary rubies available for: osx/10.11/x86_64/ruby-2.3.1.

This led me to trying to reinstall homebrew, update my version of rvm, etc. I tried all of that and am still getting this error message. 这导致我尝试重新安装自制软件,更新rvm版本等。我尝试了所有这些操作,但仍收到此错误消息。

The whole reason this happened is because I tried executing a test with 发生这种情况的全部原因是因为我尝试使用

$ bundle exec rake test

I got this message 我收到此消息

RubyDep: WARNING: Your Ruby is outdated/buggy. (To disable warnings, set RUBY_DEP_GEM_SILENCE_WARNINGS=1)
RubyDep: WARNING: Your Ruby is: 2.3.0 (buggy). Recommendation: install 2.3.1.

Haven't been able to install 2.3.1 and I'm just losing my mind here. 尚未能够安装2.3.1,我在这里迷失了方向。

edit - Does one recommend installing directly from source instead of using binaries? 编辑-是否建议直接从源代码安装而不使用二进制文件?

I've reproduced your steps in my Mac laptop running OS X El Capitan. 我已经在运行OS X El Capitan的Mac笔记本电脑上重现了您的步骤。 Executing the command rvm install 2.3.1 I got the same error as you, but after that rvm kept on executing the command and eventually downloaded and installed the binaries of Ruby 2.3.1. 执行命令rvm install 2.3.1我遇到了与您相同的错误,但是在那之后rvm继续执行命令,最终下载并安装了Ruby 2.3.1的二进制文件。 My output was like this: 我的输出是这样的:

Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.11/x86_64/ruby-2.3.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/user/.rvm/rubies/ruby-2.3.1, this may take a while depending on your cpu(s)...
ruby-2.3.1 - #downloading ruby-2.3.1, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13.7M  100 13.7M    0     0  5854k      0  0:00:02  0:00:02 --:--:-- 5855k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.3.1 - #extracting ruby-2.3.1 to /Users/user/.rvm/src/ruby-2.3.1....
ruby-2.3.1 - #configuring...........................................................
ruby-2.3.1 - #post-configuration.
ruby-2.3.1 - #compiling.............................................................
ruby-2.3.1 - #installing.........
ruby-2.3.1 - #making binaries executable..
Installed rubygems 2.5.1 is newer than 2.4.8 provided with installed ruby, skipping installation, use --force to force installation.
ruby-2.3.1 - #gemset created /Users/user/.rvm/gems/ruby-2.3.1@global
ruby-2.3.1 - #importing gemset /Users/user/.rvm/gemsets/global.gems...............................................
ruby-2.3.1 - #generating global wrappers........
ruby-2.3.1 - #gemset created /Users/user/.rvm/gems/ruby-2.3.1
ruby-2.3.1 - #importing gemsetfile /Users/user/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.3.1 - #generating default wrappers........
ruby-2.3.1 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.3.1 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri

After that I executed rvm use 2.3.1 and ruby -v and the output of the last command was: 之后,我执行rvm use 2.3.1ruby -v ,最后一条命令的输出为:

ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]

So I could successfully install Ruby 2.3.1 on Mac OS X El Capitan. 因此,我可以在Mac OS X El Capitan上成功安装Ruby 2.3.1。 Please provide further information if this cannot help solving your problem. 如果这不能帮助您解决问题,请提供更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM