Ticket #111 (closed defect: fixed)
NoMethodError when doing Ajax.Request with webrick
| Reported by: | macournoyer | Owned by: | somebody |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | camping.rb | Version: | |
| Keywords: | Cc: |
Description
I'm using prototype 1.4.0 and trying to do a simple Ajax request with webrick. (It's working with mongrel)
with the following code on the view side:
url = "/links/#{link.title.encode}/vote/#{verdict}"
a verdict, :onclick => "new Ajax.Request('#{url}', { method: 'post' });",
:href => 'javascript:void(0);'
I get this response with webrick
Camping Problem!
Linkr::Controllers::Votes.POST
NoMethodError undefined method `read' for nil:NilClass:
- (eval):24:in `initialize'
- (eval):44:in `run'
- /usr/local/lib/ruby/gems/1.8/gems/camping-1.5.177/lib/camping/reloader.rb:117:in `run'
- /usr/local/lib/ruby/gems/1.8/gems/camping-1.5.177/lib/camping/webrick.rb:45:in `service'
- /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
- /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
- /usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
- /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
- /usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
- /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
- /usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
- /usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
- /usr/local/lib/ruby/gems/1.8/gems/camping-1.5.177/bin/camping:244
- /usr/local/bin/camping:18
Change History
Note: See
TracTickets for help on using
tickets.
