chendo / lifx-http

A HTTP API for controlling LIFX devices.
MIT License
91 stars 13 forks source link

Error installing gem #3

Closed james-cxx closed 10 years ago

james-cxx commented 10 years ago

Using Ubuntu desktop 12.04. Compiled Ruby 2.1.1 from source (since there's no 2.x package for desktop 12.04 as far as I can tell. Extracted lifx-http from GitHub supplied zip file. But when I try to install...

james@ubuntuvm:~/Downloads/lifx-http-master$ ls bin Gemfile lib lifx-http.gemspec start.sh doc.png Gemfile.lock LICENSE README.md james@ubuntuvm:~/Downloads/lifx-http-master$ sudo gem install lifx-http ERROR: Loading command: install (LoadError) cannot load such file -- zlib ERROR: While executing gem ... (NoMethodError) undefined method `invoke_with_build_args' for nil:NilClass

...looks like I need zlib? Is this a system-level library or a Ruby library, or is it some other problem entirely? Thanks for your help.

chendo commented 10 years ago

You don't need to clone the repo to install it from the gem. Also, sudo by default will scrub the environment so it's likely you're not using the Ruby that you've just installed, so try without sudo. It appears the system Ruby was not compiled with zilb (not even sure how that happened).

Alternatively, you can look at chruby and ruby-install for easier ways to install and manage ruby installs.

james-cxx commented 10 years ago

Thanks for the tips. Ubuntu Desktop 12.04 does not appear to come with any version of Ruby. Hence my original install from source. In any case, ruby-install got me there. I did notice that I have better luck with the json formatted commands for some reason. I seem to get Length Required issues with the pure http.

I'm having great fun controlling my LIFX bulb programmatically. This ticket can be closed. BTW, is there a developers discussion forum somewhere? Thanks!

chendo commented 10 years ago

Yeah, you need to pass in an empty body to curl for POST/PUT etc. Glad you're having fun! There's no forum per se yet, but there is a community IRC on Freenode (#lifx)