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

to_json complains in Rails 3.1.x apps #80

Closed mattsears closed 13 years ago

mattsears commented 13 years ago

It appears livereload's dependency on ruby-json is causing to_json to throw "wrong number of arguments (0 for 1)" in Rails 3.1.x apps.

I'm running Rails 3.1.0.rc1 and Ruby 1.9.2

guitsaru commented 13 years ago

It does the same in 3.0.9. The dependency on ruby-json also completely breaks activesupport's json handling in other ways:

User.first.to_json => "\"#<User:0x007fcfe7fd25a0>\""

Instead of the desired attributes as json

logankoester commented 13 years ago

This appears to be fixed by replacing 'ruby-json' with 'json', see pull request https://github.com/mockko/livereload/pull/90