0

I'm new to Ruby on Rails, and am trying to make an app. I ran rails new myApp, and it ran into a problem when installing byebug.

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. C:/Ruby21/bin/ruby.exe extconf.rb creating Makefile make "DESTDIR=" clean 0 [main] rm 5012 open_stackdumpfile: Dumping stack trace to rm.exe.stackdump make: [clean-static] Error 5 (ignored) 0 [main] rm 4148 open_stackdumpfile: Dumping stack trace to rm.exe.stackdump make: [clean] Error 5 (ignored) make "DESTDIR=" generating byebug-i386-mingw32.def compiling breakpoint.c cc1.exe: warnings being treated as errors In file included from c:/Ruby21/include/ruby-2.1.0/ruby/defines.h:217:0, from c:/Ruby21/include/ruby-2.1.0/ruby/ruby.h:29, from c:/Ruby21/include/ruby-2.1.0/ruby.h:33, from ./byebug.h:4, from breakpoint.c:1: c:/Ruby21/include/ruby-2.1.0/ruby/win32.h:320:44: error: 'struct timespec' declared inside parameter list c:/Ruby21/include/ruby-2.1.0/ruby/win32.h:320:44: error: its scope is only thisdefinition or declaration, which is probably not what you want c:/Ruby21/include/ruby-2.1.0/ruby/win32.h:321:43: error: 'struct timespec' declared inside parameter list make: *** [breakpoint.o] Error 1 make failed, exit code 2 Gem files will remain installed in C:/Ruby21/lib/ruby/gems/2.1.0/gems/byebug-4.0.5 for inspection. Results logged to C:/Ruby21/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/byebug-4.0.5/gem_make.out An error occurred while installing byebug (4.0.5), and Bundler cannot continue. Make sure that `gem install byebug -v '4.0.5'` succeeds before bundling. 

So it looks like the compiler is treating warnings as errors, and byebug has a warning? And I need to configure the compiler to not treat warnings as errors?

3
  • Any chance you've installed DevKit for compiling libraries? Commented Apr 25, 2015 at 2:35
  • I just installed it. It gives the same error. Commented Apr 25, 2015 at 3:23
  • 1
    My suggestion was going to be to uninstall it if you had it installed. github.com/deivid-rodriguez/byebug/issues/119 Commented Apr 25, 2015 at 3:25

1 Answer 1

1

You should try to uninstall/reinstall DevKit for Windows as MarsAtomic adviced.
For Mac what worked for me was running
xcode-select --install
and specifying github: 'deivid-rodriguez/byebug' for byebug in Gemfile (not sure that it's necessary though).

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.