Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActiveAdmin + Unicorn - Body yielded non-string value ERROR #831

Closed
antonzaytsev opened this issue Dec 9, 2011 · 5 comments
Closed

ActiveAdmin + Unicorn - Body yielded non-string value ERROR #831

antonzaytsev opened this issue Dec 9, 2011 · 5 comments

Comments

@antonzaytsev
Copy link

I have unicorn (4.1.1) on my production server with latest active admin (0.3.4).
When I trying to open /admin I get this

E, [2011-12-09T02:24:42.155377 #22164] ERROR -- : app error: "Body yielded non-string value {all_active_admin_html_here}" (Rack::Lint::LintError)
E, [2011-12-09T02:24:42.155478 #22164] ERROR -- : /home/www/.rvm/gems/ruby-1.9.2-p290@global/gems/rack-1.3.5/lib/rack/lint.rb:19:in 'assert'
E, [2011-12-09T02:24:42.155529 #22164] ERROR -- : /home/www/.rvm/gems/ruby-1.9.2-p290@global/gems/rack-1.3.5/lib/rack/lint.rb:519:in 'block in each'
E, [2011-12-09T02:24:42.155563 #22164] ERROR -- : /home/www/.rvm/gems/ruby-1.9.2-p290@global/gems/activerecord-3.1.2/lib/active_record/query_cache.rb:46:in 'each'
E, [2011-12-09T02:24:42.155596 #22164] ERROR -- : /home/www/.rvm/gems/ruby-1.9.2-p290@global/gems/activerecord-3.1.2/lib/active_record/query_cache.rb:46:in 'each'
E, [2011-12-09T02:24:42.155628 #22164] ERROR -- : /home/www/.rvm/gems/ruby-1.9.2-p290@global/gems/activerecord-3.1.2/lib/active_record/connection_adapters/abstract/connection_poion_pool.rb:458:in 'each'
E, [2011-12-09T02:24:42.155661 #22164] ERROR -- : /home/www/.rvm/gems/ruby-1.9.2-p290@global/gems/rack-1.3.5/lib/rack/body_proxy.rb:23:in 'method_missing'
E, [2011-12-09T02:24:42.155694 #22164] ERROR -- : /home/www/.rvm/gems/ruby-1.9.2-p290@global/gems/rack-1.3.5/lib/rack/lint.rb:517:in 'each'
E, [2011-12-09T02:24:42.155727 #22164] ERROR -- : /home/www/.rvm/gems/ruby-1.9.2-p290@global/gems/rack-1.3.5/lib/rack/body_proxy.rb:23:in 'method_missing'
E, [2011-12-09T02:24:42.155759 #22164] ERROR -- : /home/www/.rvm/gems/ruby-1.9.2-p290@affiliate/gems/unicorn-4.1.1/lib/unicorn/http_response.rb:41:in 'http_response_write'
E, [2011-12-09T02:24:42.155791 #22164] ERROR -- : /home/www/.rvm/gems/ruby-1.9.2-p290@affiliate/gems/unicorn-4.1.1/lib/unicorn/http_server.rb:536:in 'process_client'
E, [2011-12-09T02:24:42.155824 #22164] ERROR -- : /home/www/.rvm/gems/ruby-1.9.2-p290@affiliate/gems/unicorn-4.1.1/lib/unicorn/http_server.rb:600:in 'worker_loop'
E, [2011-12-09T02:24:42.155861 #22164] ERROR -- : /home/www/.rvm/gems/ruby-1.9.2-p290@affiliate/gems/unicorn-4.1.1/lib/unicorn/http_server.rb:485:in 'spawn_missing_workers'
E, [2011-12-09T02:24:42.155894 #22164] ERROR -- : /home/www/.rvm/gems/ruby-1.9.2-p290@affiliate/gems/unicorn-4.1.1/lib/unicorn/http_server.rb:135:in 'start'
E, [2011-12-09T02:24:42.155927 #22164] ERROR -- : /home/www/.rvm/gems/ruby-1.9.2-p290@affiliate/gems/unicorn-4.1.1/bin/unicorn:121:in ''
E, [2011-12-09T02:24:42.155959 #22164] ERROR -- : /home/www/.rvm/gems/ruby-1.9.2-p290@affiliate/bin/unicorn:19:in 'load'
E, [2011-12-09T02:24:42.155991 #22164] ERROR -- : /home/www/.rvm/gems/ruby-1.9.2-p290@affiliate/bin/unicorn:19:in ''
@antonzaytsev
Copy link
Author

hm, no one who can help ?

@coreyti
Copy link

coreyti commented Dec 14, 2011

+1

same issue here.

@fmendez
Copy link
Contributor

fmendez commented Dec 16, 2011

not sure if this could help, but I was having something similar : app error: Body yielded non-string value "avatar_url", "test". I figure that it had to do with what the http method being called (in this case was a call to a PUT ) was returning. I solve it by returning nil from the PUT method (i guess it would be the same for post). Hope this can help.

@antonzaytsev
Copy link
Author

This comment really help me, hope it helps for other too #298 (comment)

Just use command unicorn_rails instead of unicorn to start server

@esad
Copy link

esad commented Jun 16, 2012

This is not really a solution. ActiveAdmin is not complying to Rack spec by not returning String objects but instead Arbre::Context objects.

I've opened a separate issue #1402 with more information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants