I'm trying to install the xively Ruby gem on the Raspberry Pi - http://rubygems.org/gems/xively-rb

However, during install the following occurs:

gem install xively-rb Building native extensions. This could take a while... ERROR: Error installing xively-rb: ERROR: Failed to build gem native extension.

/usr/local/rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.0.0-p353/gems/yajl-ruby-1.2.0 for inspection. Results logged to /usr/local/rvm/gems/ruby-2.0.0-p353/gems/yajl-ruby-1.2.0/ext/yajl/gem_make.out

I'm pretty sure I fixed this issue on Windows by install the dev version of ruby, but executing rvm list shows that I have the correct versions installed:

$ rvm list

rvm rubies

   ruby-1.9.1-p431-dev [ armv6l ]
=* ruby-2.0.0-p353 [ armv6l ]    
   ruby-2.0.0-p353-dev [ armv6l ]

Where =* denotes the currently used ruby version.

How can I correct my setup to install xively?


Take a look at the log file that got generated when you attempted to compile this Ruby gem. The log file is a little hard to tease out of the above output but it will likely tell you why the compilation of this Gem failed.

$ more /usr/local/rvm/gems/ruby-2.0.0-p353/gems/yajl-ruby-1.2.0/ext/yajl/gem_make.out

A couple of guesses as to why this might be happening:

  • Xively only works with certain versions of Ruby
  • Tools such as gcc or some lower level library may be missing on your system
  • Gem will only build on certain platforms (i.e. might not compile on Raspbery Pi on ARM architecture)

If you find an issue make sure to report back to the maintainer/developer of Xively so that they can fix the underlying issue and make their Gem better!

|improve this answer|||||
  • Thanks. I'm pretty sure I checked the log file and it contained "/usr/local/rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb" which I didn't think was very helpful, but I'll double check – barry Jan 7 '14 at 12:35
  • @barry - please pastebin it if you can, I'd like to take a look at it either way. – slm Jan 7 '14 at 13:58
  • Will do - it'll be this evening – barry Jan 7 '14 at 14:25
  • I'm afraid the contents of the log file are simply "/usr/local/rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb" – barry Jan 7 '14 at 19:37
  • @barry - are you doing a gem install xively? I do happen to have a Rasp Pi box so if I have time I could try your command there. I use OpenElec though for my OS – slm Jan 7 '14 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.