Problem installing Ruby 1.9.2 using RVM on Mac OS X Snow Leopard

I just started learning Ruby and tried to install the latest version using RVM on a Macbook Air, and it continues to fail. I have to do something wrong, as I donโ€™t see anyone else complaining about this exact error during the installation of Ruby after you did an extensive search on the Internet.

Steps taken:

Dima$ rvm install ruby-1.9.2-p290 Installing Ruby from source to: /Users/Dima/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)... ruby-1.9.2-p290 - #fetching ruby-1.9.2-p290 - #extracted to /Users/Dima/.rvm/src/ruby-1.9.2-p290 (already extracted) Fetching yaml-0.1.4.tar.gz to /Users/Dima/.rvm/archives Extracting yaml-0.1.4.tar.gz to /Users/Dima/.rvm/src Configuring yaml in /Users/Dima/.rvm/src/yaml-0.1.4. Compiling yaml in /Users/Dima/.rvm/src/yaml-0.1.4. Installing yaml to /Users/Dima/.rvm/usr ruby-1.9.2-p290 - #configuring ruby-1.9.2-p290 - #compiling ERROR: Error running 'make ', please read /Users/Dima/.rvm/log/ruby-1.9.2-p290/make.log ERROR: There has been an error while running make. Halting the installation. 

After that, as the error message was suggested, I went and looked at the make.log file:

 compiling fiddle /usr/bin/gcc-4.2 -I. -I../../.ext/include/x86_64-darwin10.7.0 -I../.././include -I../.././ext/fiddle -DRUBY_EXTCONF_H=\"extconf.h\" -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -o closure.o -c closure.c In file included from closure.c:1: ./fiddle.h:18:17: error: ffi.h: No such file or directory In file included from ./fiddle.h:71, from closure.c:1: ./conversions.h:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token closure.c:7: error: expected specifier-qualifier-list before 'ffi_closure' closure.c: In function 'dealloc': closure.c:22: error: 'fiddle_closure' has no member named 'pcl' closure.c:26: error: 'fiddle_closure' has no member named 'cif' closure.c:27: error: 'fiddle_closure' has no member named 'argv' closure.c:27: error: 'fiddle_closure' has no member named 'argv' closure.c: In function 'closure_memsize': closure.c:40: error: 'fiddle_closure' has no member named 'cif' closure.c:42: error: 'fiddle_closure' has no member named 'argv' closure.c:43: error: 'ffi_closure' undeclared (first use in this function) closure.c:43: error: (Each undeclared identifier is reported only once closure.c:43: error: for each function it appears in.) closure.c: At top level: closure.c:54: error: expected ')' before '*' token closure.c: In function 'allocate': closure.c:146: error: 'fiddle_closure' has no member named 'pcl' closure.c:146: error: 'ffi_closure' undeclared (first use in this function) closure.c:151: error: 'fiddle_closure' has no member named 'cif' closure.c:151: error: 'ffi_cif' undeclared (first use in this function) closure.c: In function 'initialize': closure.c:163: error: 'ffi_cif' undeclared (first use in this function) closure.c:163: error: 'cif' undeclared (first use in this function) closure.c:164: error: 'ffi_closure' undeclared (first use in this function) closure.c:164: error: 'pcl' undeclared (first use in this function) closure.c:165: error: 'ffi_status' undeclared (first use in this function) closure.c:165: error: expected ';' before 'result' closure.c:169: error: 'FFI_DEFAULT_ABI' undeclared (first use in this function) closure.c:177: error: 'fiddle_closure' has no member named 'argv' closure.c:177: error: 'ffi_type' undeclared (first use in this function) closure.c:177: error: expected expression before ')' token closure.c:181: error: 'fiddle_closure' has no member named 'argv' closure.c:183: error: 'fiddle_closure' has no member named 'argv' closure.c:188: error: 'fiddle_closure' has no member named 'cif' closure.c:189: error: 'fiddle_closure' has no member named 'pcl' closure.c:191: error: 'result' undeclared (first use in this function) closure.c:193: error: 'fiddle_closure' has no member named 'argv' closure.c:195: error: 'FFI_OK' undeclared (first use in this function) closure.c:199: error: 'callback' undeclared (first use in this function) make[1]: *** [closure.o] Error 1 make: *** [mkmain.sh] Error 1 

I'm not sure how to decrypt this exactly, my initial instinct was to say that I did not have FFI, but I had never seen this requirement in any of the installation steps for Ruby. Is this something special for my computer?

Any help from someone who comes across this would be greatly appreciated. Apologize in advance for any missing parts in the message, as I'm not quite sure how to do this. Please let me know what additional information will be useful for troubleshooting, and I will add it to the message.

thanks

+4
source share
3 answers

After several disappointments, I finished downloading Mac OS X Lion and Xcode 4 on my Macbook Air, and then tried running rvm install ruby-1.9.2-p290 and it worked without problems.

0
source

Thoughtbot lay out an excellent guide on setting up rails in a new OSX installation. Definitely check this out as this will probably help you:

http://robots.thoughtbot.com/post/8700977975/2011-rubyists-guide-to-a-mac-os-x-development

+2
source

When I started by programming some rails on my macbook pro, I had some errors when installing ruby โ€‹โ€‹with rvm. I donโ€™t remember the errors I received, but I had to install xcode and then I was able to install ruby โ€‹โ€‹with rvm.

+1
source

Source: https://habr.com/ru/post/1369186/


All Articles