Installing Wit gem causes obscure Ruby error - ruby-on-rails

I created a brand new Rails app and added gem wit to the Gemfile. Now, when I run bundle install, I get this error. In Googling to find a solution, I came across four different possibilities but none of them apply to my dev environment (OSX 10.9.5, Brew 0.9.5). Has anyone solved this issue?
Links:
The compiler failed to generate an executable file. (RuntimeError)
https://github.com/CocoaPods/CocoaPods/issues/1727
https://github.com/copiousfreetime/hitimes/issues/26
https://teamtreehouse.com/forum/rails-gem-wont-install-properly
...
Using turbolinks 2.5.2
Using uglifier 2.5.3
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/user/.rvm/rubies/ruby-2.1-head/bin/ruby -r ./siteconf20141204-96223-d2ceuv.rb extconf.rb
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12.7M 100 12.7M 0 0 741k 0 0:00:17 0:00:17 --:--:-- 723k
checking for main() in -lsox... *** 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
--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=/Users/user/.rvm/rubies/ruby-2.1-head/bin/ruby
--with-wit-dir
--without-wit-dir
--with-wit-include
--without-wit-include=${wit-dir}/include
--with-wit-lib
--without-wit-lib=${wit-dir}/lib
--with-soxlib
--without-soxlib
/Users/user/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/user/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/mkmf.rb:541:in `try_link0'
from /Users/user/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/mkmf.rb:556:in `try_link'
from /Users/user/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/mkmf.rb:742:in `try_func'
from /Users/user/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/mkmf.rb:973:in `block in have_library'
from /Users/user/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
from /Users/user/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
from /Users/user/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /Users/user/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
from /Users/user/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /Users/user/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
from /Users/user/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
from /Users/user/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/mkmf.rb:968:in `have_library'
from extconf.rb:33:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/user/.rvm/gems/ruby-2.1-head/gems/wit-1.0.5 for inspection.
Results logged to /Users/user/.rvm/gems/ruby-2.1-head/extensions/x86_64-darwin-13/2.1.0/wit-1.0.5/gem_make.out
An error occurred while installing wit (1.0.5), and Bundler cannot continue.
Make sure that `gem install wit -v '1.0.5'` succeeds before bundling.
Here is the output for mkmf.log
$ cat /Users/user/.rvm/gems/ruby-2.1-head/extensions/x86_64-darwin-13/2.1.0/wit-1.0.5/mkmf.log
"/usr/bin/clang -o conftest -I/Users/user/.rvm/rubies/ruby-2.1-head/include/ruby-2.1.0/x86_64-darwin13.0 -I/Users/user/.rvm/rubies/ruby-2.1-head/include/ruby-2.1.0/ruby/backward -I/Users/user/.rvm/rubies/ruby-2.1-head/include/ruby-2.1.0 -I. -I/Users/user/.rvm/gems/ruby-2.1-head/gems/wit-1.0.5/ext/wit/libwit/include -I/Users/user/.rvm/rubies/ruby-2.1-head/include -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wextra-tokens -fno-common -pipe conftest.c -L. -L/Users/user/.rvm/rubies/ruby-2.1-head/lib -L/Users/user/.rvm/gems/ruby-2.1-head/gems/wit-1.0.5/ext/wit/libwit/lib -L/Users/user/.rvm/rubies/ruby-2.1-head/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -lwit -lsox -lcurl -lruby.2.1.0 -lpthread -lgmp -ldl -lobjc "
ld: library not found for -lsox
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */

I got this problem solved by reinstalling X-Code's Command Line tools: xcode-install --select

Related

I am not able to install Nokogiri

I am working on Ruby On Rails and whenever I try to install nokogiri-1.6.7.2, I get the following error:
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
current directory: /usr/local/opt/gems/gems/nokogiri-1.6.7.2/ext/nokogiri
/usr/local/bin/ruby -r ./siteconf20160607-19453-7k21kq.rb extconf.rb
Ignoring binding_of_caller-0.7.2 because its extensions are not built. Try: gem pristine binding_of_caller --version 0.7.2
Ignoring byebug-8.2.2 because its extensions are not built. Try: gem pristine byebug --version 8.2.2
Ignoring debug_inspector-0.0.2 because its extensions are not built. Try: gem pristine debug_inspector --version 0.0.2
checking if the C compiler accepts ... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
Building nokogiri using packaged libraries.
Ignoring nokogiri-1.6.7.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.7.2
Ignoring sqlite3-1.3.11 because its extensions are not built. Try: gem pristine sqlite3 --version 1.3.11
*** 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=/usr/local/bin/$(RUBY_BASE_NAME)
--help
--clean
--use-system-libraries
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- openssl (LoadError)
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/2.3.0/net/https.rb:23:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/gems/2.3.0/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:3:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/gems/2.3.0/gems/mini_portile2-2.0.0/lib/mini_portile2.rb:2:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from extconf.rb:397:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/usr/local/opt/gems/extensions/x86_64-darwin-15/2.3.0-static/nokogiri-1.6.7.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /usr/local/opt/gems/gems/nokogiri-1.6.7.2 for inspection.
Results logged to /usr/local/opt/gems/extensions/x86_64-darwin-15/2.3.0-static/nokogiri-1.6.7.2/gem_make.out
Due to this Rails Server too is not starting and giving me error.. please help the results of the mkmf.log is below:-
"clang -o conftest -I/usr/local/include/ruby-2.3.0/x86_64-darwin15 -I/usr/local/include/ruby-2.3.0/ruby/backward -I/usr/local/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -pipe conftest.c -L. -L/usr/local/lib -L. -fstack-protector -L/usr/local/lib -lruby-static -framework CoreFoundation -lpthread -lgmp -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
"clang -I/usr/local/include/ruby-2.3.0/x86_64-darwin15 -I/usr/local/include/ruby-2.3.0/ruby/backward -I/usr/local/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -pipe -Werror -c conftest.c"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */
"clang -I/usr/local/include/ruby-2.3.0/x86_64-darwin15 -I/usr/local/include/ruby-2.3.0/ruby/backward -I/usr/local/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -pipe -Wno-error=unused-command-line-argument-hard-error-in-future -Werror -c conftest.c"
error: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Werror,-Wunknown-warning-option]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */
Can anyone please help me resolve this.
Thanks
The issue actually has nothing to do with nokogiri and more to do with rbenv (or specifically, ruby-build).
9 times out of 10, running xcode-select --install will fix the issue. If that doesn't, I would suggest reviewing this wiki article to make sure your build environment is properly configured.
If you need more help after that, I would suggest tagging your question with rbenv. Personally, I stopped using it because of annoyances like this.
try to install nodes:
sudo apt-get install nodejs

'gem install ffi' failed on Mac OS X Yosemite 10.10.5

I'm trying to set up a RoR environment under RVM on Mac OS X Yosemite 10.10.5 on my macbook pro.
The ruby version that I need to install is 1.9.3-p194 because it's required for my software development project.
So far, I have the following software installed on my Macbook:
RVM
ruby 1.9.3-p194
xcode v6.4 and the respective version of command line tools
Mac OS X version: 10.10.5 Yosemite
It seems I'm running into a problem that the ffi gem (an independency of my project) cannot be built successfully.
I get the following error whenever I try to install the gem via the command "gem install ffi -v '1.9.3'"
MacBook-Pro:demo-project apple$ gem install ffi -v '1.9.3'
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
/Users/apple/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -r ./siteconf20160428-1898-idt325.rb extconf.rb
checking for ffi_call() in -lffi... *** 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
--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=/Users/apple/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/lib
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
--with-ffilib
--without-ffilib
/Users/apple/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/apple/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0'
from /Users/apple/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:476:in `try_link'
from /Users/apple/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:619:in `try_func'
from /Users/apple/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:845:in `block in have_library'
from /Users/apple/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /Users/apple/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /Users/apple/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/apple/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /Users/apple/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/apple/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /Users/apple/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /Users/apple/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:840:in `have_library'
from extconf.rb:20:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/apple/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.9.3 for inspection.
Results logged to /Users/apple/.rvm/gems/ruby-1.9.3-p194/extensions/x86_64-darwin-14/1.9.1/ffi-1.9.3/gem_make.out
I said I have the xcode command line tools installed, but notice from the given error below that it gave me a hint "You have to install development tools first".
Didn't I have it installed already? I was asking myself out of curiousity.
Then I googled and found out the way how to check if I have xcode command line tools installed. Then I launched the terminal and issued that command as illustrated below, and the result did confirm that the piece of software was already installed.
MacBook-Pro:demo-project apple$ xcode-select -p
/Applications/Xcode.app/Contents/Developer
Here is also my gcc version:
MacBook-Pro:demo-project apple$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
I have searched all over the web and tried many solutions, but, unfortunately, without success.
Any advice would be very much appreciated to get this to work.
Updated:
My mkmf.log
package configuration for libffi
cflags: -I/usr/local/Cellar/libffi/3.0.13/lib/libffi-3.0.13/include
ldflags: -L/usr/local/Cellar/libffi/3.0.13/lib
libs: -lffi
"/usr/local/bin/gcc-4.9 -o conftest -I/Users/apple/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/x86_64-darwin14.5.0 -I/Users/apple/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/backward -I/Users/apple/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1 -I. -I/usr/local/opt/libyaml/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -fno-common -pipe -I/usr/local/Cellar/libffi/3.0.13/lib/libffi-3.0.13/include conftest.c -L. -L/Users/apple/.rvm/rubies/ruby-1.9.3-p194/lib -L/usr/local/opt/libyaml/lib -L. -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L/usr/local/Cellar/libffi/3.0.13/lib -lffi -lruby.1.9.1 -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */

Nokogumbo 1.4.7 does not recognize development tools

For some reason, when I run 'bundle install' in my root directory, every gem succeeds in installing - except for Nokogumbo-1.4.7. Here is the error I receive:
C:/Ruby200/bin/ruby.exe extconf.rb
checking for xmlNewDoc() in -lxml2... *** 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=C:/Ruby200/bin/ruby
--with-xml2lib
--without-xml2lib
C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:519:in `try_link0'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:534:in `try_link'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:714:in `try_func'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:944:in `block in have_library'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:889:in `block in checking_for'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:888:in `checking_for'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:939:in `have_library'
from extconf.rb:4:in `<main>'
mkmf.log shows the following:
"gcc -o conftest.exe -IC:/Ruby200/include/ruby-2.0.0/i386-mingw32 -IC:/Ruby200/include/ruby-2.0.0/ruby/backward -IC:/Ruby200/include/ruby-2.0.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -std=c99 conftest.c -L. -LC:/Ruby200/lib -L. -lmsvcrt-ruby200 -lshell32 -lws2_32 -limagehlp -lshlwapi "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7: return 0;
8: }
/* end */
When I first got this error, I reinstalled and tested the DevKit by following the instructions outlined on its GitHub, tried again, and received the same error.
I did further research, and found someone who had the same issue as I did, but with an earlier version of Nokogumbo. The issue can be found here. I followed the "hacky workaround" described in the comments of this issue, but it did not work for me.
I've had trouble finding any other support for this gem, as the only issues I can find are only related to Nokogiri, which I've had no trouble installing.
Does anyone have any suggestions on the next steps I should take?
Thanks in advance!
Additional information:
- Ruby on Rails V 4.2.6
- Ruby V 2.0.0

Mac 10.8 + RVM: Installing Rails 4 Needs development tools?

I'm having issues installing Rails 4 with rvm. I saw another solution with removing rvm from my system, but that is not an option because I need isolated gemsets. This is my terminal:
Edmunds-MacBook-Pro:pipetask edmundmai$ rvm current
ruby-2.0.0-p247#pipetask
Edmunds-MacBook-Pro:pipetask edmundmai$ ls
Gemfile README.rdoc app config db lib public
Gemfile.lock Rakefile bin config.ru gcc-4.2 log vendor
Edmunds-MacBook-Pro:pipetask edmundmai$ gem install rails -v=4.0.0
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/Users/edmundmai/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
*** 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=/Users/edmundmai/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
--with-atomic_reference-dir
--without-atomic_reference-dir
--with-atomic_reference-include
--without-atomic_reference-include=${atomic_reference-dir}/include
--with-atomic_reference-lib
--without-atomic_reference-lib=${atomic_reference-dir}/
/Users/edmundmai/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/edmundmai/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:519:in `try_link0'
from /Users/edmundmai/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:817:in `try_run'
from extconf.rb:26:in `<main>'
Gem files will remain installed in /Users/edmundmai/.rvm/gems/ruby-2.0.0-p247#pipetask/gems/atomic-1.1.14 for inspection.
Results logged to /Users/edmundmai/.rvm/gems/ruby-2.0.0-p247#pipetask/gems/atomic-1.1.14/ext/gem_make.out
Edmunds-MacBook-Pro:pipetask edmundmai$
How would I debug this? I don't even know which mkmf.log it is talking about, I have like 50 of them when I do locate mkmf.log. What is development tools? I have xcode 5 and command line tools.
==Update
This might be the mkmf.log file it was referring to?
Edmunds-MacBook-Pro:bin edmundmai$ more /Users/emai/mkmf.log
have_func: checking for rb_hash_foreach()... -------------------- yes
"clang -o conftest -I/Users/emai/.rvm/rubies/ruby-2.0.0-p0/include/ruby-2.0.0/x86_64-darwin11.4.2 -I/Users/emai/.rvm/rubies/ruby-2.0.0-p0/include/ruby-2.0.0/ruby/backward -I/Users/emai/.rvm/rubies/ruby-2.0.0-p0/include/ruby-2.0.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/Users/emai/.rvm/usr/include -I/Users/emai/.rvm/usr/include -O3 -g3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -pipe conftest.c -L. -L/Users/emai/.rvm/rubies/ruby-2.0.0-p0/lib -L/Users/emai/.rvm/usr/lib -L. -fstack-protector -L/Users/emai/.rvm/usr/lib -L/Users/emai/.rvm/usr/lib -lruby-static -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(void) {return 0;}
/* end */
"clang -o conftest -I/Users/emai/.rvm/rubies/ruby-2.0.0-p0/include/ruby-2.0.0/x86_64-darwin11.4.2 -I/Users/emai/.rvm/rubies/ruby-2.0.0-p0/include/ruby-2.0.0/ruby/backward -I/Users/emai/.rvm/rubies/ruby-2.0.0-p0/include/ruby-2.0.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/Users/emai/.rvm/usr/include -I/Users/emai/.rvm/usr/include -O3 -g3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -pipe conftest.c -L. -L/Users/emai/.rvm/rubies/ruby-2.0.0-p0/lib -L/Users/emai/.rvm/usr/lib -L. -fstack-protector -L/Users/emai/.rvm/usr/lib -L/Users/emai/.rvm/usr/lib -lruby-static -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: int main(void) {return 0;}
5: extern int t(void);
6: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_hash_foreach; return 0; }
/* end */
--------------------

Instailling Rails 2.0.0 extconf.rb failure on windows 7

I'm trying to install rails 2.0.0 on my computer. I already have already installed ruby on my computer, running the
ruby -v
command returns
ruby 2.0.0p247 (2013-06-27) [x64-mingw32]
Now, I'm trying to install rails 2.0.0 by running
gem install rails
However, I am running into an error:
C:/Ruby200-x64/bin/ruby.exe extconf.rb
*** 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=C:/Ruby200-x64/bin/ruby
--with-atomic_reference-dir
--without-atomic_reference-dir
--with-atomic_reference-include
--without-atomic_reference-include=${atomic_reference-dir}/include
--with-atomic_reference-lib
--without-atomic_reference-lib=${atomic_reference-dir}/
C:/Ruby200-x64/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 C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:515:in `try_link0'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:813:in `try_run'
from extconf.rb:24:in `<main>'
4th line up says I need to install development tools, so I downloaded the dev kit from http://rubyinstaller.org/downloads/ for my 64 bit windows, and ran the following commands without issue:
ruby dk.rb init
ruby dk.rb install
However, I still got the same error after running gem rails install... .am I installing the wrong development tools or something? I'm not sure what's going wrong
Additionally I'm using pik to control my ruby version, if that information is relevant.
Note: I checked out another possible solution that said that my userfolder had spaces in it, causing the install to go wonky, but my user account doesn't have spaces in it, so that didn't help.
*edit: the mkmf file with more info:
"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -IC:/Ruby200-x64/include/ruby-2.0.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -march=native conftest.c -L. -LC:/Ruby200-x64/lib -L. -lx64-msvcrt-ruby200 -lshell32 -lws2_32 -limagehlp -lshlwapi "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7: return 0;
8: }
/* end */

Resources