Ruby on rails 在将可引导HD从一台机器切换到另一台机器时,Ruby无法启动

Ruby on rails 在将可引导HD从一台机器切换到另一台机器时,Ruby无法启动,ruby-on-rails,ruby,osx-mavericks,rbenv,Ruby On Rails,Ruby,Osx Mavericks,Rbenv,一款MacBookPro(大约2011年)出现问题,我将硬盘换成另一款MacBookPro(大约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.htm

一款MacBookPro(大约2011年)出现问题,我将硬盘换成另一款MacBookPro(大约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工作版本的最佳方法是什么?

您可以在这里看到openssl的问题

通常在安装Ruby时,计算机上安装的任何OpenSSL都会动态链接到已安装的libs

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

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

短版本、Core Solo和Core Duo为32位,Core 2 Duo和更高版本为64位


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

我不明白“不,我不明白”。这就是“ruby与硬件相连”的答案吗?这有助于阐明背景信息。我首先更新了openssl以处理ruby版本
brew安装openssl@1.1brew install curl
我通过rbenv重新安装了ruby,并出现了相同的解释器/扩展库错误。但并没有先把它去掉。rbenv询问“2.3.4存在”。“继续吗?”我说了。我分析您的指示,因为“删除和安装”导致与“安装结束”不同的行为?我确认这是完全正确的。(事情是这样的,我正在去苹果商店安装的路上!)。通过新安装的操作系统,ruby是可以安装的。