Skip to content

Instantly share code, notes, and snippets.

@Ortuna
Last active December 11, 2015 18:09
Show Gist options
  • Save Ortuna/4639694 to your computer and use it in GitHub Desktop.
Save Ortuna/4639694 to your computer and use it in GitHub Desktop.
class Blog < Padrino::Application
layout :application
get :index do
test_hash = { :a => 1, :b => 2, :c => 3 }
render test_hash
end
end
NoMethodError - undefined method `to_json' for {:a=>1, :b=>2, :c=>3}:Hash:
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/application/rendering.rb:159:in `render'
/Users/ortuna/Desktop/blog/app/controllers/blog.rb:6:in `block in <class:Blog>'
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/application/routing.rb:573:in `call'
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/application/routing.rb:573:in `block in route'
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/application/routing.rb:54:in `[]'
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/application/routing.rb:54:in `block (3 levels) in process_destination_path'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.3/lib/sinatra/base.rb:851:in `route_eval'
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/application/routing.rb:54:in `block (2 levels) in process_destination_path'
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/application/routing.rb:54:in `catch'
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/application/routing.rb:54:in `block in process_destination_path'
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/application/routing.rb:28:in `instance_eval'
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/application/routing.rb:28:in `process_destination_path'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/http_router-0.10.2/lib/http_router/node/root.rb:57:in `block in []'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/http_router-0.10.2/lib/http_router/node/root.rb:47:in `catch'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/http_router-0.10.2/lib/http_router/node/root.rb:47:in `[]'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/http_router-0.10.2/lib/http_router/node/root.rb:13:in `[]'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/http_router-0.10.2/lib/http_router.rb:119:in `block in call'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/http_router-0.10.2/lib/http_router.rb:119:in `catch'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/http_router-0.10.2/lib/http_router.rb:119:in `call'
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/application/routing.rb:933:in `route!'
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/application/routing.rb:914:in `dispatch!'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in `block in call!'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in `block in invoke'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in `catch'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in `invoke'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in `call!'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.3/lib/sinatra/base.rb:755:in `call'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/rack-1.5.0/lib/rack/head.rb:11:in `call'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/rack-1.5.0/lib/rack/methodoverride.rb:21:in `call'
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/reloader.rb:252:in `call'
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/logger.rb:404:in `call'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.3/lib/sinatra/showexceptions.rb:21:in `call'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.3/lib/sinatra/base.rb:1389:in `block in call'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.3/lib/sinatra/base.rb:1471:in `synchronize'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.3/lib/sinatra/base.rb:1389:in `call'
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/router.rb:83:in `block in call'
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/router.rb:76:in `each'
/Users/ortuna/Desktop/padrino-framework/padrino-core/lib/padrino-core/router.rb:76:in `call'
/Users/ortuna/.rvm/gems/ruby-1.9.3-p374/gems/rack-1.5.0/lib/rack/handler/webrick.rb:60:in `service'
/Users/ortuna/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/Users/ortuna/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/Users/ortuna/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment