Closed inconduit closed 12 years ago
I'm using the same version of Ruby, Rails, and JSONBuilder as you but cannot reproduce the issue.
➜ old_rails ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-darwin11.3.0]
➜ old_rails rails -v
Rails 2.3.14
➜ old_rails gem list json_builder
*** LOCAL GEMS ***
json_builder (3.1.3)
➜ old_rails curl http://localhost:3000/jobs.json
{
"hello": "world"
}
Could you try setting Pretty Print to false and tell me if that works? Put this in config/environments/development.rb
:
config.action_view.pretty_print_json = false
hey, thanks for the response. i have since moved to rabl and uninstalled JSONBuilder. i don't have that environment available anymore, but again thanks for the response.
On 2012-07-04, at 3:51 PM, Garrett Bjerkhoel wrote:
I'm using the same version of Ruby, Rails, and JSONBuilder as you but cannot reproduce the issue.
➜ old_rails ruby -v ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-darwin11.3.0] ➜ old_rails rails -v Rails 2.3.14 ➜ old_rails gem list json_builder *** LOCAL GEMS *** json_builder (3.1.3) ➜ old_rails curl http://localhost:3000/jobs.json { "hello": "world" }
Could you try setting Pretty Print to false and tell me if that works? Put this in
config/environments/development.rb
:config.action_view.pretty_print_json = false
Reply to this email directly or view it on GitHub: https://github.com/dewski/json_builder/issues/27#issuecomment-6766783
Since I am unable to reproduce it locally, it would be awesome if you could quickly add the json_builder
gem back to your app (alongside RABL), and create a test view. You may need to rename the rabl view temporarily. Would like to make sure others don't run into this in the future while using json_builder
.
_app/views/folder/index.json.jsonbuilder
hello "world"
i have a different environment set up now so i can't do that easily. i was using RVM and i think i had a misconfiguration there as i was very new to rails. i'm pretty sure it was something specific to my mangled use of rvm and gemsets.
On 2012-07-04, at 4:01 PM, Garrett Bjerkhoel wrote:
Since I am unable to reproduce it locally, it would be awesome if you could quickly add the
json_builder
gem back to your app (alongside RABL), and create a test view. You may need to rename the rabl view temporarily. Would like to make sure others don't run into this in the future while usingjson_builder
._app/views/folder/index.json.jsonbuilder
hello "world"
Reply to this email directly or view it on GitHub: https://github.com/dewski/json_builder/issues/27#issuecomment-6766894
Thanks for your time, if you ever have time to reproduce this that'd be awesome. Thanks again.
i'm new to rails so this is probably my own issue and not json_builder's but i don't know where else to look.
trying to render some json and i get uninitialized constant JSONBuilder::Compiler::JSON. i'm using rails 2.3.14 and ruby 1.8.7, installed using bundler and i'm also using RVM.
this is getting thrown from a json_builder view. i've pasted the trace below. can anyone suggest what i might have done wrong? is the json_builder gem compatiable with this old version of rails? thanks in advance.