So I've been using the Odin Project to get started with Web Developing after aimlessly trying to learn for over a year, and I've started downloading everything I need. I own a Windows, so although I've been trying really hard the tide seems to be against me. I'm trying to update rails in the Ruby and Rails command prompt that's downloaded with railsinstaller. I'm not entirely sure of everything so sorry if I sound clueless. Here is the code I keep getting:
C:\Sites>gem install rails --no-ri --no-rdoc
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
current directory: C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/nokogiri-1.6.7/ext/nokogiri
C:/RailsInstaller/Ruby2.1.0/bin/ruby.exe -r ./siteconf20151206-3704-fzexqt.rb extconf.rb
checking if the C compiler accepts ... *** 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:/RailsInstaller/Ruby2.1.0/bin/ruby
--help
--clean
C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (R
You have to install development tools first.
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/mkmf.rb:571:in `block in try_compile'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/mkmf.rb:522:in `with_werror'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/mkmf.rb:571:in `try_compile'
from extconf.rb:80:in `nokogiri_try_compile'
from extconf.rb:87:in `block in add_cflags'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/mkmf.rb:621:in `with_cflags'
from extconf.rb:86:in `add_cflags'
from extconf.rb:336:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/nokogiri-1.6.7/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/nokogiri-1.6.7 for inspection.
Results logged to C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/nokogiri-1.6.7/gem_make.out
I've looked online and tried to replace my debugger with byebug, not sure if this would have even works but stuff it, tried anyway, didn't work.
I'd really appreciate any help with this, and any advice in general really!
Thanks for reading :)
Here's the contents of the mkmf file,
t.exe -IC:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/i386-mingw32 - IC:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/backward -IC:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -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 conftest.c -L. -LC:/RailsInstaller/Ruby2.1.0/lib -L. -lmsvcrt-ruby210 -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
In file included from C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby.h:33:0,
from conftest.c:1:
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h:109:14: error: size of array 'ruby_check_sizeof_voidp' is negative
In file included from C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby.h:33:0,
from conftest.c:1:
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h: In function 'rb_obj_wb_unprotect':
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h:1234:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h:1235:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h:1238:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h: In function 'rb_obj_written':
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h:1253:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h: In function 'rb_num2char_inline':
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h:1324:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h:1324:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h:1324:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h:1325:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h:1325:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h:1325:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h: In function 'rb_class_of':
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h:1642:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h: In function 'rb_type':
C:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/ruby.h:1659:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
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 */
Thank you for the suggestion! I can't really make sense of it so any help would be greatly appreciated :)