Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building native extensions. This could take a while

I have trouble updating gems on my machine

  • osx 10.9.2
  • xcode upadted, command line tools installed
  • ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]

I do:

$ sudo gem update
Password:
Updating installed gems
Updating bigdecimal
Building native extensions.  This could take a while...

It just stuck here, I can wait whole day nothing happens, I just see my fan speed gets to 6k. Im not familiar with ruby I just use some gems, like sass, compass, etc..

Was looking around, but couldn't find a solution, I see other people get some kind of error, but I get nothing, it's just stuck.

Any advice? Maybe delete gems and reinstall them?

$ gem environment
RubyGems Environment:
  - RUBYGEMS VERSION: 2.2.2
  - RUBY VERSION: 2.0.0 (2014-02-24 patchlevel 451) [universal.x86_64-darwin13]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.0.0
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - SPEC CACHE DIRECTORY: /Users/xyz/.gem/specs
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-13
  - GEM PATHS:
     - /Library/Ruby/Gems/2.0.0
     - /Users/xyz/.gem/ruby/2.0.0
     - /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /usr/local/bin
like image 631
Bobz Avatar asked May 25 '14 08:05

Bobz


People also ask

What is native extension?

A native extension is a combination of: ActionScript classes. Native code. Native code is defined here as code that executes outside the runtime. For example, code that you write in C is native code.

What is GEM native extensions?

“Native extensions” are the glue that connects a Ruby gem with some other non-Ruby software component or library present on your machine. The native extensionis not the dependency. A native extension is generally a C code that interacts with a non-Ruby dependency.


1 Answers

When gem says Building native extensions, that means it's compiling some C code in order to bundle an extension along with the given gem. Your fans going to 6k is probably the result of processor intensive compilation - as in, compiling the extension uses quite a bit of your processor.

I would watch your processes to make sure that it's being at least compiled.

like image 93
Jeremy Rodi Avatar answered Nov 06 '22 00:11

Jeremy Rodi