-1

Having a problem with one Macbook Pro (circa 2011), I swap the hard disk into another Macbook Pro (circa 2008).

Firing up the terminal to launch a rails application server rails s, the server fails to launch with error

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

right after the rails s command:

/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 is installed via rbenv.

To me it is rather illogical that an entire environment on a given disk does not behave the same way on another computer. It appears ruby is somehow tethered to the version of the hardware on which it is running. Is this assumption mistaken?

What is the best way to proceed to obtain working versions of ruby, considering that this disk may also need to be moved to another machine, as the condition should be temporary?

Jerome
  • 5,583
  • 3
  • 33
  • 76
  • I do not understand 'No, I don't'. Is this the answer to 'ruby being tethered to the hardware'? – Jerome Aug 21 '17 at 10:00

1 Answers1

1

You can see the issue coming from openssl here.

Whatever OpenSSL is installed on your computer is dynamically linked to installed libs, usually at the time you install Ruby.

Machines that old may be 32-bit instead of 64-bit.

You can check your processor type here:

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

Short version, Core Solo and Core Duo are 32-bit, Core 2 Duo and later are 64-bit.

Removing and reinstalling Ruby through rbenv or ruby-install should fix your issue, but if you are indeed booting a hard drive on new hardware, I'm a bit surprised you aren't having a lot more trouble than with just Ruby.

Unixmonkey
  • 18,485
  • 7
  • 55
  • 78
  • This was helpful in illuminating the background info. I first updated openssl to handle ruby version `brew install openssl@1.1 brew install curl` I re-installed ruby via rbenv and hit the same interpreter/extension libraries error. But did not do it by removing first. rbenv asked '2.3.4 exists. proceed?' and I did. I parse your indication as remove & install leads to different behaviour from install-over? – Jerome Aug 22 '17 at 04:30
  • I confirm this is totally correct. (as things would have it I was on my way to Apple store to get an install!). With a fresh install of the OS, ruby is installable. – Jerome Aug 24 '17 at 17:29