# Why doesn't json pure work in Rails?

**URL:** <https://www.ruby-forum.com/t/why-doesnt-json-pure-work-in-rails/141827>\
**Category:** Rails\
**Created:** [June 30, 2008, 9:11pm UTC](https://www.ruby-forum.com/t/why-doesnt-json-pure-work-in-rails/141827 "2008-06-30T21:11:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@brian](https://www.ruby-forum.com/u/brian)\
**Post date:** [June 30, 2008, 9:11pm UTC](https://www.ruby-forum.com/t/why-doesnt-json-pure-work-in-rails/141827/1 "2008-06-30T21:11:28Z")

</div>

installed json\_pure 1.1.2 and whenever Rails calls to\_json on a model  
I get the following error:

ArgumentError (wrong number of arguments (2 for 1)):  
c:/ruby/lib/ruby/gems/1.8/gems/json\_pure-1.1.2/lib/json/pure/  
generator.rb:251:in `to_json' c:/ruby/lib/ruby/gems/1.8/gems/json_pure-1.1.2/lib/json/pure/ generator.rb:251:in`json\_transform’  
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/  
active\_record/attribute\_methods.rb:211:in `map' c:/ruby/lib/ruby/gems/1.8/gems/json_pure-1.1.2/lib/json/pure/ generator.rb:245:in`each’  
c:/ruby/lib/ruby/gems/1.8/gems/json\_pure-1.1.2/lib/json/pure/  
generator.rb:245:in `map' c:/ruby/lib/ruby/gems/1.8/gems/json_pure-1.1.2/lib/json/pure/ generator.rb:245:in`json\_transform’  
c:/ruby/lib/ruby/gems/1.8/gems/json\_pure-1.1.2/lib/json/pure/  
generator.rb:218:in `to_json' /vendor/plugins/appcelerator/lib/appcelerator/extensions.rb:35:in`to\_json’  
c:/ruby/lib/ruby/gems/1.8/gems/json\_pure-1.1.2/lib/json/pure/  
generator.rb:300:in `json_transform' c:/ruby/lib/ruby/gems/1.8/gems/json_pure-1.1.2/lib/json/pure/ generator.rb:299:in`map’  
c:/ruby/lib/ruby/gems/1.8/gems/json\_pure-1.1.2/lib/json/pure/  
generator.rb:299:in `json_transform' c:/ruby/lib/ruby/gems/1.8/gems/json_pure-1.1.2/lib/json/pure/ generator.rb:272:in`to\_json’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/  
action\_controller/base.rb:888:in `render_with_no_layout' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ action_controller/layout.rb:259:in`render\_without\_benchmark’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/  
action\_controller/benchmarking.rb:51:in `render' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/core_ext/benchmark.rb:8:in`realtime’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/  
action\_controller/benchmarking.rb:51:in `render' /app/controllers/getthere_bookings_controller.rb:4:in`index’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/  
action\_controller/base.rb:1162:in `send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ action_controller/base.rb:1162:in`perform\_action\_without\_filter  
s’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/  
action\_controller/filters.rb:580:in `call_filters' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ action_controller/filters.rb:573:in`perform\_action\_without\_benc  
hmark’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/  
action\_controller/benchmarking.rb:68:in `perform_action_without_ rescue' c:/ruby/lib/ruby/1.8/benchmark.rb:293:in`measure’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/  
action\_controller/benchmarking.rb:68:in `perform_action_without_ rescue' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ action_controller/rescue.rb:201:in`perform\_action\_without\_cachi  
ng’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/  
action\_controller/caching/sql\_cache.rb:13:in `perform_action' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/ active_record/connection_adapters/abstract/query_cache.rb:33:i n`cache’  
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/  
active\_record/query\_cache.rb:8:in `cache' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ action_controller/caching/sql_cache.rb:12:in`perform\_action’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/  
action\_controller/base.rb:529:in `send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ action_controller/base.rb:529:in`process\_without\_filters’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/  
action\_controller/filters.rb:569:in `process_without_session_man agement_support' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ action_controller/session_management.rb:130:in`process’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/  
action\_controller/base.rb:389:in `process' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ action_controller/dispatcher.rb:149:in`handle\_request’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/  
action\_controller/dispatcher.rb:107:in `dispatch' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ action_controller/dispatcher.rb:104:in`synchronize’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/  
action\_controller/dispatcher.rb:104:in `dispatch' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ action_controller/dispatcher.rb:120:in`dispatch\_cgi’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/  
action\_controller/dispatcher.rb:35:in `dispatch' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/bin/../ lib/mongrel/rails.rb:76:in`process’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/bin/…/  
lib/mongrel/rails.rb:74:in `synchronize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/bin/../ lib/mongrel/rails.rb:74:in`process’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/lib/  
mongrel.rb:159:in `process_client' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/lib/ mongrel.rb:158:in`each’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/lib/  
mongrel.rb:158:in `process_client' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/lib/ mongrel.rb:285:in`run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/lib/  
mongrel.rb:285:in `initialize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/lib/ mongrel.rb:285:in`new’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/lib/  
mongrel.rb:285:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/lib/ mongrel.rb:268:in`initialize’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/lib/  
mongrel.rb:268:in `new' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/lib/ mongrel.rb:268:in`run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/lib/  
mongrel/configurator.rb:282:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/lib/ mongrel/configurator.rb:281:in`each’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/lib/  
mongrel/configurator.rb:281:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/bin/ mongrel_rails:128:in`run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/lib/  
mongrel/command.rb:212:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4-x86-mswin32-60/bin/ mongrel_rails:281 c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/dependencies.rb:502:in`load’  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/  
active\_support/dependencies.rb:502:in `load' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/dependencies.rb:354:in`new\_constants\_in’  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/  
active\_support/dependencies.rb:502:in `load' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/servers/ mongrel.rb:64 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`gem\_original\_require’  
c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`require' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/dependencies.rb:509:in`require’  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/  
active\_support/dependencies.rb:354:in `new_constants_in' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/dependencies.rb:509:in`require’  
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:  
39  
c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem\_original\_require’
