[英]Problems installing Ruby/Rails, even with RVM
So here is what happened: I started working for a company and was given a macbook pro for work. 所以这就是发生的事情:我开始在一家公司工作,并得到了Macbook Pro上班。 I do customer support for Exceptional/Airbrake so i need to learn Ruby/Rails.
我为Exceptional / Airbrake提供客户支持,所以我需要学习Ruby / Rails。 So the laptop had a previous owner and i dont know what he did with it.
所以笔记本电脑有一个以前的所有者,我不知道他是怎么做的。
I tried to install Ruby and Rails and kept getting errors, then tried doing it with rvm, and i thought it was working as i could run irb and even execute a test program with ruby. 我尝试安装Ruby和Rails并不断出错,然后尝试使用rvm进行操作,并且我认为它可以正常运行,因为我可以运行irb甚至使用ruby执行测试程序。 I got tired of seeing the previous owners name on the command line so i changed the home folder and I am pretty sure this is where things got bad.
我已经厌倦了在命令行上看到以前的所有者名称,所以我更改了主文件夹,并且我很确定这是问题所在。 I took the contents of rvm and everything and moved it to my User file from the old one then deleted the old one.
我获取了rvm的内容以及所有内容,并将其从旧文件移至我的用户文件,然后删除了旧文件。
Everything seemed to still be working fine, but when I wanted to start working with rails as well, t it wouldnt work.So i figured i would just uninstall everything and start over, i tried rvm implode and removed all gems. 一切似乎仍然可以正常工作,但是当我也想开始使用rails时,它就无法工作。所以我想我将卸载所有一切并重新开始,我尝试rvm内爆并移除了所有宝石。 when i run 'gem list', i get empty, and i cant find ruby anywhere but when i run irb, it still works.
当我运行“宝石列表”时,我变得空了,我在任何地方都找不到红宝石,但是当我运行irb时,它仍然有效。 so i tried re-installing using rvm, but i keep getting errors.
所以我尝试使用rvm重新安装,但我不断收到错误消息。
The first error that occurs is: 发生的第一个错误是:
No binary rubies available for: osx/10.7/x86_64/ruby-2.0.0-p0.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
the second error is: 第二个错误是:
Error running 'env GEM_PATH=/Users/robertmroz/.rvm/gems/ruby-2.0.0-p0:/Users/robertmroz/.rvm/gems/ruby-2.0.0-p0@global:/Users/robertmroz/.rvm/gems/ruby-2.0.0-p0:/Users/robertmroz/.rvm/gems/ruby-2.0.0-p0@global GEM_HOME=/Users/robertmroz/.rvm/gems/ruby-2.0.0-p0 /Users/robertmroz/.rvm/rubies/ruby-2.0.0-p0/bin/ruby /Users/robertmroz/.rvm/src/rubygems-2.0.3/setup.rb', please read /Users/robertmroz/.rvm/log/ruby-2.0.0-p0/rubygems.install.log
and the last error is: 最后一个错误是:
ERROR: Loading command: install (LoadError)
cannot load such file -- openssl
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
I have gone through dozens of google searches, most of them leading me here, on each of these errors, and sometimes the certain error seems to be fixed, but in the end i cant get it to work. 我经历了数十次谷歌搜索,其中大多数都将我引到了这些错误的每一个上,有时某些错误似乎已解决,但最终我无法使它正常工作。 Should i just wipe the OS and start over, cause I have been trying to get this done for days now.
我是否应该擦除操作系统并重新开始,因为几天来我一直在努力完成此任务。
BTW, i dont know why it is installing 2.0.0 i thought rvm installed the latest version by default. 顺便说一句,我不知道为什么要安装2.0.0,我认为rvm默认安装了最新版本。
Before you blow out the system I'd: 在吹灭系统之前,我会:
rvm implode
, gem uninstall rvm
) see this question rvm implode
, gem uninstall rvm
)看到这个问题 \\curl -L https://get.rvm.io
without Rails). \\curl -L https://get.rvm.io
不带 Rails)。 rvm install 1.9.2
) stay away from 2.0 for now. rvm install 1.9.2
想要的ruby版本( rvm install 1.9.2
) rvm install 1.9.2
不使用2.0。 Hopefully that will straighten things out. 希望那会理顺一切。
I also suffered from the same problems while installing Ruby , but after googling a lot I found the solution . 在安装Ruby时,我也遇到了同样的问题,但是经过大量搜索之后,我找到了解决方案。 Follow the below process :
请遵循以下过程:
Ruby 2.0.0-p0 was recently released, so that is the latest version technically, although I kind of doubt you really want the latest version since it is so new and your company may still be running an older version like 1.9.3. Ruby 2.0.0-p0是最近发布的,因此从技术上讲这是最新版本,尽管我有点怀疑您真的想要最新版本,因为它是如此新,并且您的公司可能仍在运行旧版本,如1.9.3。 Have you tried installing 1.9.3-p392 (the current 1.9.3 version)?
您是否尝试安装1.9.3-p392(当前的1.9.3版本)?
If you still get the error with 1.9.3, I would try the instructions shown on the RVM site : 如果仍然出现1.9.3错误,我将尝试RVM站点上显示的说明:
$ rvm pkg install openssl
$ rvm reinstall 1.9.2 --with-openssl-dir=$rvm_path/usr
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.