error Gem::Ext::BuildError: ERROR: Failed to build gem native extension. when installing bundler for react native CLI - ruby

I realized that because I was using expo go to create my react native project I was unable to link firebase to it, so I decided I would use the CLI in hopes that I could follow a tutorial online that I found that uses it. Long story short spent 4 hours fiddling with ruby, homebrew, watchman, node, etc. And I have nearly got it to download the React native CLI, however I am getting this error. I originally was getting an error that said the Gem needed 2.7.5 and I was using 3.0.0 so I switched it using rvm and now this is the error I get. TBH if someone knows how to connect firebase to react-native using expo go I would rather just keep working on that project than starting a new one, but I don't think it is possible, so if someone can help me figure out why I am getting this error that would be helpful as well.
here is the full error:
Installing dependencies
✔ CocoaPods (https://cocoapods.org/) is not installed. CocoaPods is necessary for the iOS project to run correctly. Do you want to install it? › Yes, with gem (may require sudo)
✔ Installing CocoaPods
✖ Installing Bundler
error Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/jonnywerthman/Desktop/Dev
stuff/personal/90dayz/Dayz90/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c
/Users/jonnywerthman/.rvm/rubies/ruby-2.7.5/bin/ruby -I
/Users/jonnywerthman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0 -r
./siteconf20221226-91293-hikzkd.rb extconf.rb
checking for ffi_prep_closure_loc() in -lffi... no
checking for ffi_prep_closure_loc() in -llibffi... no
checking for ffi_prep_closure_loc() in -llibffi-8... no
checking for whether -Wl,--exclude-libs,ALL is accepted as LDFLAGS... no
checking for whether -pthread is accepted as LDFLAGS... yes
creating extconf.h
creating Makefile
current directory: /Users/jonnywerthman/Desktop/Dev
stuff/personal/90dayz/Dayz90/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c
make "DESTDIR=" clean
current directory: /Users/jonnywerthman/Desktop/Dev
stuff/personal/90dayz/Dayz90/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c
make "DESTDIR="
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** ["/Users/jonnywerthman/Desktop/Dev] Error 2
make failed, exit code 2
Gem files will remain installed in /Users/jonnywerthman/Desktop/Dev
stuff/personal/90dayz/Dayz90/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5 for
inspection.
Results logged to /Users/jonnywerthman/Desktop/Dev
stuff/personal/90dayz/Dayz90/vendor/bundle/ruby/2.7.0/extensions/x86_64-darwin-22/2.7.0/ffi-1.15.5/gem_make.out
/Users/jonnywerthman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:99:in
`run'
/Users/jonnywerthman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:51:in
`block in make'
/Users/jonnywerthman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:43:in
`each'
/Users/jonnywerthman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:43:in
`make'
/Users/jonnywerthman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/ext_conf_builder.rb:63:in
`block in build'
/Users/jonnywerthman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/tempfile.rb:291:in
`open'
/Users/jonnywerthman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/ext_conf_builder.rb:30:in
`build'
/Users/jonnywerthman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:169:in
`block in build_extension'
/Users/jonnywerthman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:165:in
`synchronize'
/Users/jonnywerthman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:165:in
`build_extension'
/Users/jonnywerthman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:210:in
`block in build_extensions'
/Users/jonnywerthman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:207:in
`each'
/Users/jonnywerthman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:207:in
`build_extensions'
/Users/jonnywerthman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/installer.rb:844:in
`build_extensions'
/Users/jonnywerthman/.rvm/gems/ruby-2.7.5/gems/bundler-2.4.1/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/Users/jonnywerthman/.rvm/gems/ruby-2.7.5/gems/bundler-2.4.1/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/Users/jonnywerthman/.rvm/gems/ruby-2.7.5/gems/bundler-2.4.1/lib/bundler/source/rubygems.rb:200:in
`install'
/Users/jonnywerthman/.rvm/gems/ruby-2.7.5/gems/bundler-2.4.1/lib/bundler/installer/gem_installer.rb:54:in
`install'
/Users/jonnywerthman/.rvm/gems/ruby-2.7.5/gems/bundler-2.4.1/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/Users/jonnywerthman/.rvm/gems/ruby-2.7.5/gems/bundler-2.4.1/lib/bundler/installer/parallel_installer.rb:155:in
`do_install'
/Users/jonnywerthman/.rvm/gems/ruby-2.7.5/gems/bundler-2.4.1/lib/bundler/installer/parallel_installer.rb:146:in
`block in worker_pool'
/Users/jonnywerthman/.rvm/gems/ruby-2.7.5/gems/bundler-2.4.1/lib/bundler/worker.rb:62:in
`apply_func'
/Users/jonnywerthman/.rvm/gems/ruby-2.7.5/gems/bundler-2.4.1/lib/bundler/worker.rb:57:in
`block in process_queue'
/Users/jonnywerthman/.rvm/gems/ruby-2.7.5/gems/bundler-2.4.1/lib/bundler/worker.rb:54:in
`loop'
/Users/jonnywerthman/.rvm/gems/ruby-2.7.5/gems/bundler-2.4.1/lib/bundler/worker.rb:54:in
`process_queue'
/Users/jonnywerthman/.rvm/gems/ruby-2.7.5/gems/bundler-2.4.1/lib/bundler/worker.rb:90:in
`block (2 levels) in create_threads'
An error occurred while installing ffi (1.15.5), and Bundler cannot continue.
In Gemfile:
cocoapods was resolved to 1.11.3, which depends on
cocoapods-core was resolved to 1.11.3, which depends on
typhoeus was resolved to 1.4.0, which depends on
ethon was resolved to 0.16.0, which depends on
ffi
✖ Installing Bundler
error Error: Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/next/environment-setup and follow the React Native CLI QuickStart guide for macOS and iOS.
Error: Error: Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/next/environment-setup and follow the React Native CLI QuickStart guide for macOS and iOS.
at createFromTemplate (/Users/jonnywerthman/node_modules/#react-native-community/cli/build/commands/init/init.js:169:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.initialize [as func] (/Users/jonnywerthman/node_modules/#react-native-community/cli/build/commands/init/init.js:222:3)
at async Command.handleAction (/Users/jonnywerthman/node_modules/#react-native-community/cli/build/index.js:140:9)
I tried a lot of different stuff, but I am nearing my breaking point with this. pls help.

Look at the error:
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** ["/Users/jonnywerthman/Desktop/Dev] Error 2
This means "The string "/Users/jonnywerthman/Desktop/Dev doesn't have an end set of quotation marks and I was expecting to find one." And ultimately that means it can't continue executing.
I don't know and can't speak to why the path isn't being properly quoted. It's probably a misconfiguration of the tools that are being run.
The fastest and simplest solution is to remove the whitespace from the path, so that you turn this:
/Users/jonnywerthman/Desktop/Dev stuff/
Into this:
/Users/jonnywerthman/Desktop/Devstuff/
Then retry the operation.

Related

Installing and running jekyll on Windows 10

I tried Github pages on Friday and found it great so decided to install Jekyll locally (Windows 10) so I could build and test offline. After spending almost a day and trying multiple recipes (from theserverside.com, jekyllrb.com, etc) for how to install Jekyll I finally got jekyll -v to work. (Note that the instructions I found weren't bad but probably just out of date. People need to updates their blogs, or better people should stop changing how things are set up!)
However, now when I try to serve a test site I get a Segmentation fault (as below). I have tried starting again from scratch several times and even strangely get different results but have never gotten as far as serving the site.
$ ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]```
$ jekyll -v
jekyll 4.2.2
$ jekyll new myblog
...
$ cd myblog
$ bundle exec jekyll serve
Configuration file: e:/Work/tmp/Daily/blog/myblog/_config.yml
Source: e:/Work/tmp/Daily/blog/myblog
Destination: e:/Work/tmp/Daily/blog/myblog/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/engine.rb:43: [BUG] Segmentation fault
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]
-- Control frame information -----------------------------------------------
c:0033 p:---- s:0182 e:000181 CFUNC :compile_data_context
c:0032 p:0314 s:0177 e:000176 METHOD C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/engine.rb:43
...
[+576 more lines of backtrace and runtime info - available on request]
Thanks for any help you can give me to get Jekyll working.
BTW I don't like to complain but getting Ruby and Jekyll installed and running has been a royal pain. Maybe I have been spoilt with Go which literally took less than 10 minutes to install and have a running program (though calling C from Go (using CGO) took me a few hours to get working). Moreover, if Jekyll was written in Go it would a simple matter of downloading a single jekyll.exe - ie a few minutes instead of days (or however long it takes to get this working).
Update: I have tried lots of things with varying results but I never get as far as Jekyll serving the site. I don't know enough about Ruby and/or understand what the error messages mean to try to fix these things so I have now taken to documenting exactly what I tried and the result. Here are the last 4 things I tried and the result:
================================
Using Ruby 3.1.2.1 + Devkit (x64) and following instructions at https://jekyllrb.com/docs/installation/windows/ which run without error but then serving a test site has an error:
$ jekyll -v
jekyll 4.2.2
$ jekyll new myblog
...
New jekyll site installed in D:/myblog.
$ cd myblog
$ bundle exec jekyll serve
Configuration file: D:/myblog/_config.yml
Source: D:/myblog
Destination: D:/myblog/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
done in 1.829 seconds.
Please add the following to your Gemfile to avoid polling for changes:
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
Auto-regeneration: enabled for 'D:/myblog'
------------------------------------------------
Jekyll 4.2.2 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve/servlet.rb:3:in `require':
cannot load such file -- webrick (LoadError)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve/servlet.rb:3:in `<top (required)>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:179:in `require_relative'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:179:in `setup'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:100:in `process'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
from C:/Ruby31-x64/bin/jekyll:32:in `load'
from C:/Ruby31-x64/bin/jekyll:32:in `<main>'
=======================================
Using Ruby 3.1.2-1 and following instructions at https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/jekyll-install-windows-example-blog-tutorial after a lot of trial and error I eventually got jekyll serve to run but it said "generating feed" then stopped and there was no server running at http://localhost:4000.
=======================================
Using Ruby 3.0.4-1 (x64) and following instructions at https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/jekyll-install-windows-example-blog-tutorial I get to the very end but when I try to serve the a test site I get:
$ bundle exec jekyll serve
Configuration file: D:/myblog/_config.yml
Source: D:/myblog
Destination: D:/myblog/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
done in 0.758 seconds.
Please add the following to your Gemfile to avoid polling for changes:
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
Auto-regeneration: enabled for 'D:/myblog'
------------------------------------------------
Jekyll 4.2.2 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve/servlet.rb:3:in `require': cannot load such file -- webrick (LoadError)
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve/servlet.rb:3:in `<top (required)>'
...
===================================
Using Ruby 2.7.0.1 and following instructions at https://gist.github.com/arthurattwell/281a5e1888ffd89b08b4861a2e3c1b35 I get as far as the ridk install and which fails:
$ ridk install
...
Which components shall be installed? If unsure press ENTER [1,2,3]
> sh -lc true
MSYS2 seems to be properly installed
Remove catgets to avoid conflicts while update ...
> pacman -Rdd catgets libcatgets --noconfirm
error: target not found: catgets
error: target not found: libcatgets
MSYS2 system update (optional) part 1 ...
> pacman -Syu --needed --noconfirm
:: Synchronizing package databases...
mingw32 is up to date
mingw64 is up to date
ucrt64 is up to date
clang32 is up to date
clang64 is up to date
msys is up to date
:: Starting core system upgrade...
there is nothing to do
:: Starting full system upgrade...
there is nothing to do
MSYS2 system update (optional) succeeded
MSYS2 system update (optional) part 2 ...
> pacman -Su --needed --noconfirm
:: Starting core system upgrade...
there is nothing to do
:: Starting full system upgrade...
there is nothing to do
MSYS2 system update (optional) succeeded
Install MSYS2 and MINGW development toolchain ...
> pacman -S --needed --noconfirm autoconf autoconf2.13 autogen automake-wrapper automake1.10 automake1.11 automake1.12 automake1.13 automake1.14 automake1.15 automake1.6 automake1.7 automake1.8 automake1.9 diffutils file gawk grep libtool m4 make patch pkg-config sed texinfo texinfo-tex wget mingw-w64-x86_64-binutils mingw-w64-x86_64-crt-git mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-headers-git mingw-w64-x86_64-libmangle-git mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-tools-git mingw-w64-x86_64-winpthreads-git
error: target not found: automake1.10
error: target not found: automake1.6
error: target not found: automake1.7
error: target not found: automake1.8
error: target not found: automake1.9
warning: file-5.41-4 is up to date -- skipping
warning: gawk-5.1.1-1 is up to date -- skipping
warning: grep-1~3.0-3 is up to date -- skipping
warning: sed-4.8-3 is up to date -- skipping
warning: wget-1.21.3-1 is up to date -- skipping
Install MSYS2 and MINGW development toolchain failed
Installation failed: pacman failed
I got it to work using the instructions at www.theserverside.com and installing Ruby 2.7.6
Note that the install of Ruby messed with msys/mingw and now when I try to debug my Go program I get this error:
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib/libmsvcrt.a(/359): duplicate symbol reference: _unlock_file in both libgcc(.text) and libgcc(.data)
libgcc(.text): relocation target ___chkstk_ms not defined
libgcc(.text): relocation target atexit not defined
but I guess that is a new question

Ruby on Windows: `ansi.rb` get_screen_size error: in `winsize': Bad file descriptor - <STDIN> (Errno::EBADF)

I'm trying to use fastlane on Windows, which is installed from Bundler -- which is installed by Ruby Gem. But while running, some internal error of Ruby seems blocked the execution.
First, I went to Ruby Installer and installed Ruby+Devkit 3.0.2-1 (x64); then, I installed the Bundler and Fastlane using gem command. Error below happened when I was trying to execute them -- which I believed was not related to Bundler nor Fastlane:
C:/Ruby30-x64/lib/ruby/3.0.0/reline/ansi.rb:157:in `winsize': Bad file descriptor - <STDIN> (Errno::EBADF)
from C:/Ruby30-x64/lib/ruby/3.0.0/reline/ansi.rb:157:in `get_screen_size'
from C:/Ruby30-x64/lib/ruby/3.0.0/reline.rb:168:in `get_screen_size'
from C:/Ruby30-x64/lib/ruby/3.0.0/forwardable.rb:238:in `get_screen_size'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/tty-screen-0.8.1/lib/tty/screen.rb:236:in `size_from_readline'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/tty-screen-0.8.1/lib/tty/screen.rb:66:in `size'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/tty-screen-0.8.1/lib/tty/screen.rb:76:in `width'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/fastlane-2.197.0/fastlane_core/lib/fastlane_core/print_table.rb:95:in `transform_output'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/fastlane-2.197.0/fastlane/lib/fastlane/plugins/plugin_manager.rb:335:in `print_plugin_information'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/fastlane-2.197.0/fastlane/lib/fastlane/plugins/plugin_manager.rb:316:in `load_plugins'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/fastlane-2.197.0/fastlane/lib/fastlane/commands_generator.rb:39:in `start'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/fastlane-2.197.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in `take_off'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/fastlane-2.197.0/bin/fastlane:23:in `<top (required)>'
from C:/Ruby30-x64/bin/fastlane:23:in `load'
from C:/Ruby30-x64/bin/fastlane:23:in `<main>'
I'm using Windows 10 home version 20H2.
Rebooting the computer doesn't solve the problem.
I tried googling the question, but it seems that problem hasn't be reported (or be answered). I don't know where I can report the bug either.
What can I do? Any help would be appreciated!
I had this same error when I tried running bundle exec fastlane in git bash.
I got it working by running it in powershell instead.

kernel_gem.rb:67:in `synchronize': deadlock; recursive locking (ThreadError)

when I run this command on macOS Big Sur 11.2.3:
pod setup
shows this error:
$ pod setup ‹ruby-2.7.2›
Traceback (most recent call last):
12: from /Users/dolphin/.rvm/gems/ruby-2.7.2/bin/ruby_executable_hooks:22:in `<main>'
11: from /Users/dolphin/.rvm/gems/ruby-2.7.2/bin/ruby_executable_hooks:22:in `eval'
10: from /Users/dolphin/.rvm/gems/ruby-2.7.2/bin/pod:23:in `<main>'
9: from /Users/dolphin/.rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/rubygems.rb:304:in `activate_bin_path'
8: from /Users/dolphin/.rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/rubygems.rb:304:in `synchronize'
7: from /Users/dolphin/.rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/rubygems.rb:306:in `block in activate_bin_path'
6: from /Users/dolphin/.rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/rubygems.rb:243:in `finish_resolve'
5: from /Users/dolphin/.rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/rubygems/request_set.rb:435:in `resolve_current'
4: from /Users/dolphin/.rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/rubygems/request_set.rb:435:in `new'
3: from /Users/dolphin/.rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/rubygems/resolver/set.rb:24:in `initialize'
2: from /Users/dolphin/.rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:42:in `require'
1: from /Users/dolphin/.rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_gem.rb:67:in `gem'
/Users/dolphin/.rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_gem.rb:67:in `synchronize': deadlock; recursive locking (ThreadError)
(base)
I am searching from internet but did not found some useful imformation about this problem. I have tried to reinstall cocoapods still not fix this. what should I do to fix this problem? this is my ruby env:
~/source/cruise-open on  main ⌚ 13:37:15
$ rvm list ‹ruby-2.7.2›
=* ruby-2.7.2 [ x86_64 ]
ruby-3.0.0 [ x86_64 ]
# => - current
# =* - current && default
# * - default
(base)
right now I found run pod install command still show this error.
Updating RubyGems did the trick for me.
https://guides.rubygems.org/command-reference/#gem-update
gem update --system
This error must be for any rails application. Check the ruby and rails version from the Gemfile. In my case, it's ruby 3.1.2 and rails 7.0.4.
Reinstall or Install the dependencies again. Ruby 3.1.2 is already there in my system but I reinstalled in order to fix this issue.
Remove the bundler from /.rvm/gems/ruby-3.1.2/cache
rm -rf bundler-2.3.25.gem
My Gemfile.lock was bundled with 2.3.25
And remove ruby from /.rvm/gems
rm -rf ruby-3.1.2
Now the error will be changed when you install rails or bundle to something
invalid gem: package is corrupt, exception while verifying: wrong number of arguments (given 2, expected 1) (ArgumentError) in /Users/anjanasingh/.rvm/gems/ruby-3.1.2/cache/concurrent-ruby-1.1.10.gem
Now, uninstall ruby using rvm(Yes, rvm works in my case though I used rbenv for setting the ruby versions)
rvm uninstall "ruby-3.1.2
Install ruby
rvm install "ruby-3.1.2"
bundle your application
bundle install
Rails is still not there. So, install rails
gem install rails -v 7.0.4
I have tried with 'rbenv install 3.1.2' and reinstall, installenter image description here multiple times but it was not working with rbenv. Finally rvm worked.

Invalid spec cache file

I have ruby 2.0.0p247 [x64-mingw32] with Gem 2.2.2 installed on Windows 8. I have a persistent problem gem that is making it virtually unusable. Whenever I try to install a new gem, I invariably get:
ERROR: While executing gem ... Invalid spec cache file in C:/Users/...
In the past, I've been able to run gem update or gem update --system and that would clear up the problem for one, single gem install. Subsequent install would fail with the same error. Now even gem update fails with that error message.
I've tried deleting the users/.../.gem directory. When I do that, gem update recreates that directory and promptly fails with the same error message.
I re-installed ruby 1.9.8 with gems several times to try to cure the problem, then upgraded to ruby 2.0.0. Throughout all re-installs and upgrades, the problem persisted.
I'm at my wits end here. Can anyone help me resolve this issue?
Here's the backtrace on the edit"
L:\xampp\htdocs\frameworks\yii2\framework>gem update --backtrace
Updating installed gems
ERROR: While executing gem ... (Gem::Exception)
Invalid spec cache file in C:/Users/Larry/.gem/specs/rubygems.org%443/specs.4.8
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/source.rb:187:in `rescue in load_specs'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/source.rb:179:in `load_specs'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/spec_fetcher.rb:266:in `tuples_for'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/spec_fetcher.rb:228:in `block in available_specs'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/source_list.rb:97:in `each'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/source_list.rb:97:in `each_source'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/spec_fetcher.rb:222:in `available_specs'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/spec_fetcher.rb:102:in `search_for_dependency'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/commands/update_command.rb:113:in `fetch_remote_gems'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/commands/update_command.rb:135:in `highest_remote_version'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/commands/update_command.rb:264:in `block in which_to_update'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/commands/update_command.rb:260:in `each'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/commands/update_command.rb:260:in `which_to_update'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/commands/update_command.rb:96:in `execute'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/command.rb:305:in `invoke_with_build_args'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/command_manager.rb:167:in `process_args'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/command_manager.rb:137:in `run'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/gem_runner.rb:54:in `run'
C:/Ruby200-x64/bin/gem:21:in `<main>'
I had the same problem, but was able to fix it this way:
Delete the folder in users/%user%/.gem/ and rerun the command gem sources --update
Hope this helps.

Xcode can not be installed on OSX 10.9.2

Using OS X 10.9.2 Mavericks
I have troubles installing the github-pages gem. I need to install Xcode first, but that results in an error.
I tried to install Xcode using the command: xcode-select --install. The dialog box displays three options: Download Xcode, Not now, Install
When I select 'Install' and after select accept, the process begins and stops after a while. Displaying that the software is not available on the update server.
When I select 'Download Xcode', the App store launches and I can install Xcode.
Still it seems Xcode is not installed, see the following steps.
After I installed Xcode I start Terminal and follow the instructions on Using Jekyll with pages.
When I run sudo bundle install --verbose in my root folder the compiler generates an error:/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:430:in 'try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
Below the output of the `sudo bundle install` command:
Fetching from: https://rubygems.org/api/v1/dependencies
HTTP Redirection
Fetching from: https://bundler.rubygems.org/api/v1/dependencies
HTTP Success
Fetching gem metadata from https://rubygems.org/
Query List: ["RedCloth", "blankslate", "fast-stemmer", "classifier", "colorator", "highline", "commander", "ffi", "liquid", "rb-fsevent", "rb-inotify", "rb-kqueue", "listen", "maruku", "posix-spawn", "yajl-ruby", "pygments.rb", "redcarpet", "safe_yaml", "parslet", "toml", "jekyll", "kramdown", "rdiscount", "github-pages"]
Query Gemcutter Dependency Endpoint API: RedCloth,blankslate,fast-stemmer,classifier,colorator,highline,commander,ffi,liquid,rb-fsevent,rb-inotify,rb-kqueue,listen,maruku,posix-spawn,yajl-ruby,pygments.rb,redcarpet,safe_yaml,parslet,toml,jekyll,kramdown,rdiscount,github-pages
Fetching from: https://rubygems.org/api/v1/dep...ramdown,rdiscount,github-pages
HTTP Redirection
Fetching from: https://bundler.rubygems.org/ap...ramdown,rdiscount,github-pages
HTTP Success
Query List: ["stemmer", "rake", "bones", "jekyll-redirect-from", "jekyll-mentions", "jemoji", "termios", "jekyll-coffeescript", "sass", "mercenary", "directory_watcher", "open4", "hoe", "albino", "celluloid-io", "celluloid", "rb-fchange", "syntax", "rubypython", "echoe", "psych"]
Query Gemcutter Dependency Endpoint API: stemmer,rake,bones,jekyll-redirect-from,jekyll-mentions,jemoji,termios,jekyll-coffeescript,sass,mercenary,directory_watcher,open4,hoe,albino,celluloid-io,celluloid,rb-fchange,syntax,rubypython,echoe,psych
Fetching from: https://rubygems.org/api/v1/dep...,syntax,rubypython,echoe,psych
HTTP Redirection
Fetching from: https://bundler.rubygems.org/ap...,syntax,rubypython,echoe,psych
HTTP Success
Query List: ["loquacious", "little-plugger", "rdoc", "rspec", "bones-git", "bones-extras", "timers", "facter", "nio4r", "allison", "rubyforge", "gemcutter", "rcov", "RubyInline", "coffee-script", "html-pipeline", "gemoji", "win32-api"]
Query Gemcutter Dependency Endpoint API: loquacious,little-plugger,rdoc,rspec,bones-git,bones-extras,timers,facter,nio4r,allison,rubyforge,gemcutter,rcov,RubyInline,coffee-script,html-pipeline,gemoji,win32-api
Fetching from: https://rubygems.org/api/v1/dep...html-pipeline,gemoji,win32-api
HTTP Redirection
Fetching from: https://bundler.rubygems.org/ap...html-pipeline,gemoji,win32-api
HTTP Success
Query List: ["bones-rcov", "bones-rubyforge", "bones-rspec", "bones-zentest", "git", "coffee-script-source", "execjs", "win32console", "windows-pr", "windows-api", "win32-dir", "sys-admin", "CFPropertyList", "json", "json_pure", "net-scp", "activesupport", "nokogiri", "escape_utils", "rinku", "sanitize", "github-markdown", "github-linguist", "minitest", "rspec-mocks", "rspec-expectations", "rspec-core", "cucumber", "diff-lcs", "spicycode-rcov", "ZenTest", "hitimes", "test-unit"]
Query Gemcutter Dependency Endpoint API: bones-rcov,bones-rubyforge,bones-rspec,bones-zentest,git,coffee-script-source,execjs,win32console,windows-pr,windows-api,win32-dir,sys-admin,CFPropertyList,json,json_pure,net-scp,activesupport,nokogiri,escape_utils,rinku,sanitize,github-markdown,github-linguist,minitest,rspec-mocks,rspec-expectations,rspec-core,cucumber,diff-lcs,spicycode-rcov,ZenTest,hitimes,test-unit
Fetching from: https://rubygems.org/api/v1/dep...rcov,ZenTest,hitimes,test-unit
HTTP Redirection
Fetching from: https://bundler.rubygems.org/ap...rcov,ZenTest,hitimes,test-unit
HTTP Success
Query List: ["thread_safe", "tzinfo", "multi_json", "i18n", "builder", "memcache-client", "libxml-ruby", "multi_test", "gherkin", "term-ansicolor", "treetop", "polyglot", "mime-types", "charlock_holmes", "configuration", "mkrf", "rake-compiler", "spruz", "net-ssh", "mini_portile", "racc", "tenderlove-frex", "rexical", "weakling", "rspec-support", "hpricot", "htmlentities", "win32-security"]
Query Gemcutter Dependency Endpoint API: thread_safe,tzinfo,multi_json,i18n,builder,memcache-client,libxml-ruby,multi_test,gherkin,term-ansicolor,treetop,polyglot,mime-types,charlock_holmes,configuration,mkrf,rake-compiler,spruz,net-ssh,mini_portile,racc,tenderlove-frex,rexical,weakling,rspec-support,hpricot,htmlentities,win32-security
Fetching from: https://rubygems.org/api/v1/dep...ot,htmlentities,win32-security
HTTP Redirection
Fetching from: https://bundler.rubygems.org/ap...ot,htmlentities,win32-security
HTTP Success
Query List: ["trollop", "archive-tar-minitar", "needle", "jruby-pageant", "tins", "atomic", "facets"]
Query Gemcutter Dependency Endpoint API: trollop,archive-tar-minitar,needle,jruby-pageant,tins,atomic,facets
Fetching from: https://rubygems.org/api/v1/dep...uby-pageant,tins,atomic,facets
HTTP Redirection
Fetching from: https://bundler.rubygems.org/ap...uby-pageant,tins,atomic,facets
HTTP Success
Query List: []
Fetching additional metadata from https://rubygems.org/
Query List: ["tenderlove-frex", "spicycode-rcov"]
Query Gemcutter Dependency Endpoint API: tenderlove-frex,spicycode-rcov
Fetching from: https://rubygems.org/api/v1/dep...tenderlove-frex,spicycode-rcov
HTTP Redirection
Fetching from: https://bundler.rubygems.org/ap...tenderlove-frex,spicycode-rcov
HTTP Success
Query List: []
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb --with-cflags=-w
checking for main() in -lc... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--with-redcloth_scan-dir
--without-redcloth_scan-dir
--with-redcloth_scan-include
--without-redcloth_scan-include=${redcloth_scan-dir}/include
--with-redcloth_scan-lib
--without-redcloth_scan-lib=${redcloth_scan-dir}/
--with-clib
--without-clib
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:430:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:509:in `block in try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tmpdir.rb:88:in `mktmpdir'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:506:in `try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:530:in `try_link'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:716:in `try_func'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:946:in `block in have_library'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:891:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:306:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:306:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:332:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:890:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:941:in `have_library'
from extconf.rb:5:in `<main>'
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/RedCloth-4.2.9 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/RedCloth-4.2.9/ext/redcloth_scan/gem_make.out
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/ext/builder.rb:60:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/ext/ext_conf_builder.rb:37:in `block in build'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tempfile.rb:324:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/ext/ext_conf_builder.rb:18:in `build'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/installer.rb:678:in `block (2 levels) in build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/installer.rb:677:in `chdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/installer.rb:677:in `block in build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/installer.rb:652:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/installer.rb:652:in `build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/installer.rb:218:in `install'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/source/rubygems.rb:100:in `block in install'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/rubygems_integration.rb:118:in `preserve_paths'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/source/rubygems.rb:93:in `install'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/installer.rb:111:in `block in install_gem_from_spec'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/rubygems_integration.rb:150:in `with_build_args'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/installer.rb:110:in `install_gem_from_spec'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/installer.rb:265:in `block in install_sequentially'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/forwardable.rb:171:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/forwardable.rb:171:in `each'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/installer.rb:264:in `install_sequentially'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/installer.rb:97:in `run'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/installer.rb:15:in `install'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/cli.rb:255:in `install'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/vendor/thor/command.rb:27:in `run'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/vendor/thor/invocation.rb:121:in `invoke_command'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/vendor/thor.rb:363:in `dispatch'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/vendor/thor/base.rb:440:in `start'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/cli.rb:10:in `start'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/bin/bundle:20:in `block in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/bin/bundle:20:in `<top (required)>'
/usr/bin/bundle:23:in `load'
/usr/bin/bundle:23:in `<main>'
An error occurred while installing RedCloth (4.2.9), and Bundler cannot continue.
Make sure that `gem install RedCloth -v '4.2.9'` succeeds before bundling.
The issues you are facing are specific to OSX Mavericks and the latest version(s) of XCode (as of today, May/21/2014). I'm also on 10.9.2, and I faced the following issues, which are what you're facing too, I believe.
Here are the issues I faced while trying to install/build Ruby gems that involve compiling native code and/or some dependencies that do:
You get something like Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. somewhere in your output.
Reason: the ubiquitus Command Line Tools are not installed on your system.
Solution: There are 3 ways to install the Command Line Tools: 1) installing the full XCode suite, starting it, and letting it install the Command Line Tools for you, 2) running xcode-select --install, which will pop up a dialog asking you if you want to install the full XCode, install only the Command Line Tools, or Cancel. This second approach is what I did and it worked for me once, but I've seen it fail on other machines, since apparently the location where it looks for the package online is sometimes accessible, sometimes not, so try this if you want, but it may not work, and, finally 3) downloading it from the web at the Apple Developer Tools page (login with Apple account required)
You get something like clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future] somewhere in your output.
Reason: Recent versions of XCode removed support for unused command line arguments, as the XCode 5.1 release notes mention:
Compiler
As of Apple LLVM compiler version 5.1 (clang-502) and later, the optimization level -O4 no longer implies link time optimization (LTO). In order to build with LTO explicitly use the -flto option in addition to the optimization level flag. (15633276)
The Apple LLVM compiler in Xcode 5.1 treats unrecognized command-line options as errors. This issue has been seen when building both Python native extensions and Ruby Gems, where some invalid compiler options are currently specified.
Projects using invalid compiler options will need to be changed to remove those options. To help ease that transition, the compiler will temporarily accept an option to downgrade the error to a warning:
-Wno-error=unused-command-line-argument-hard-error-in-future
Note: This option will not be supported in the future.
To workaround this issue, set the ARCHFLAGS environment variable to downgrade the error to a warning. For example, you can install a Python native extension with:
$ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future easy_install ExtensionName
Similarly, you can install a Ruby Gem with:
$ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install GemName (16214764)
Solution: the solution is mentioned on the snippet from the XCode release notes above, and basically implies setting environment variable ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future before running the gem install, like this:
export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future
gem install <your-desired-gem>
... or, if you need to execute it as sudo, put the above 2 lines in a script and execute it as sudo, or run it as sudo inline like this:
sudo bash -c "export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future; gem install <your-desired-gem>;";
Note: the solution above (setting the ARCHFLAGS environment variable) is going to stop working at some point in the future, as indicated in the aforementioned release notes. Hopefully, by that time current Ruby gems will have removed unused command line options from their Makefiles.
NB: I used the approach outlined above to successfully install the github-pages Ruby gem in OSX 10.9.2
Once you install from the App Store, find Xcode in your Applications directory and launch it (not from the terminal). It will likely tell you it needs to download a few more things. Let it. You can then go ahead and follow instructions for other software that requires Xcode. If it still doesn't work, it is likely a problem with the installation instructions of the other software. I would contact the maintainer of that software to ask about specifics. Good luck!

Resources