mockko / livereload

LiveReload applies CSS/JS changes to Safari or Chrome w/o reloading the page (and autoreloads the page when HTML changes)
http://livereload.com/
1.18k stars 56 forks source link

ruby-json seems to be broken #84

Closed hltbra closed 13 years ago

hltbra commented 13 years ago

livereload depends on ruby-json, but I could not install it:

$ sudo gem install ruby-json
ERROR:  While executing gem ... (Gem::FormatException)
    ruby-json-1.1.2 has an invalid value for @cert_chain

I did the following here to have livereload working in my Mac OS X:

diff --git a/server/lib/livereload.rb b/server/lib/livereload.rb
index 4392242..c628acf 100644
--- a/server/lib/livereload.rb
+++ b/server/lib/livereload.rb
@@ -1,6 +1,6 @@
 require 'em-websocket'
 require 'em-dir-watcher'
-require 'json/objects'
+require 'json'
 require 'stringio'

 # Chrome sometimes sends HTTP/1.0 requests in violation of WebSockets spec
diff --git a/server/livereload.gemspec b/server/livereload.gemspec
index 5f53e25..4c33190 100644
--- a/server/livereload.gemspec
+++ b/server/livereload.gemspec
@@ -22,5 +22,5 @@ Gem::Specification.new do |s|
    s.requirements << 'LiveReload Safari extension'
    s.add_dependency('em-websocket', '>= 0.2.1')
    s.add_dependency('em-dir-watcher', '>= 0.1')
-   s.add_dependency('ruby-json', '>= 1.1.2')
+   s.add_dependency('json', '>= 1.5.2')
 end

Maybe it is related to #80

Demwunz commented 13 years ago

I have a similar issue, I also get this error when trying to install livereload:

ERROR:  While executing gem ... (Gem::FormatException)
ruby-json-1.1.2 has an invalid value for @cert_chain

and when I try to run livereload from a directory I get:

/Library/Ruby/Gems/1.8/gems/livereload-1.6/bin/../lib/livereload.rb:206:in `run': undefined method `kqueue?' for EventMachine:Module (NoMethodError)
from /Library/Ruby/Gems/1.8/gems/livereload-1.6/bin/livereload:51
from /usr/bin/livereload:19:in `load'
from /usr/bin/livereload:19
torstenmirow commented 13 years ago

I have the same issue, like Demwunz

logankoester commented 13 years ago

Pull request applying hugobr's fix https://github.com/mockko/livereload/pull/90