将可启动HD从一台计算机切换到另一台计算机时,Ruby无法启动

时间:2017-08-21 09:00:43

标签: ruby-on-rails ruby osx-mavericks rbenv

对于一台Macbook Pro(大约2011年)出现问题,我将硬盘换成了另一台Macbook Pro(大约在2008年)。

启动终端以启动rails应用程序服务器rails s,服务器无法启动并显示错误

You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

rails s命令之后:

/Users/maneuser/.rbenv/versions/2.3.4/lib/ruby/2.3.0/x86_64-darwin13/openssl.bundle: 
[BUG] Illegal instruction at 0x0000011069880a
ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-darwin13]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:
     * ~/Library/Logs/CrashReporter
     * /Library/Logs/CrashReporter
     * ~/Library/Logs/DiagnosticReports
     * /Library/Logs/DiagnosticReports
   for more details.
Don't forget to include the above Crash Report log file in bug reports.

-- Control frame information -----------------------------------------------
c:0031 p:-17569493279562 s:0115 e:000114 TOP    [FINISH]
c:0030 p:---- s:0113 e:000112 CFUNC  :require
c:0029 p:0008 s:0109 e:000108 TOP    /Users/maneuser/.rbenv/versions/2.3.4/lib/ruby/2.3.0/openssl.rb:13 [FINISH]
c:0028 p:---- s:0107 e:000106 CFUNC  :require
c:0027 p:0010 s:0103 e:000102 TOP    /Users/maneuser/.rbenv/versions/2.3.4/lib/ruby/2.3.0/securerandom./Users/maneuser/.rbenv/versions/2.3.4/lib/ruby/2.3.0/x86_64-darwin13/openssl.bundle: [BUG] Illegal instruction at 0x0000010dd2480a
ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-darwin13]

Ruby是通过rbenv安装的。

对我而言,给定磁盘上的整个环境在另一台计算机上的行为方式并不相同,这是不合逻辑的。 看起来ruby以某种方式与运行它的硬件版本相关联。这个假设错了吗?

获得ruby工作版本的最佳方法是什么,考虑到这个磁盘可能还需要移动到另一台机器,因为条件应该是临时的?

1 个答案:

答案 0 :(得分:1)

你可以在这里看到来自openssl的问题。

无论您的计算机上安装了什么OpenSSL,都会动态链接到已安装的库,通常在您安装Ruby时。

旧机器可能是32位而不是64位。

您可以在此处查看处理器类型:

https://support.apple.com/en-us/HT201948

短版本,Core Solo和Core Duo是32位,Core 2 Duo,后来是64位。

通过rbenv或ruby-install删除并重新安装Ruby应该可以解决您的问题,但是如果您确实在新硬件上启动了硬盘驱动器,我有点惊讶您没有比使用Ruby更麻烦的事情

相关问题