I'm hosting my Couch instance on iriscouch.com and doing some testing with a simple Sinatra app, using CouchRest Model.
Here's a simple model I'm using:
class User < CouchRest::Model::Base
property :first_name, String
property :last_name, String
timestamps!
design do
view :by_first_name
end
end
I'm successfully creating new users with:
User.create(:first_name => "Stonewall", :last_name => "Jackson")
Executing User.by_first_name.all results in this HTTP request:
http://test_admin:[email protected]:80/blt/_design/User/_view/by_first_name?include_docs=true&reduce=false
"Accept"=>"application/json"
"Accept-Encoding"=>"gzip, deflate"
"Content-Type"=>"application/json"
This is executed by RestClient, via CouchRest. No problems there.
But when I try to curlthis URL, I get complaints from Couch about the include_docs parameter:
{"error":"query_parse_error","reason":"Query parameter `include_docs` is invalid for reduce views."}
I'd like to understand what's going on here. Why is include_docsa problem only when using curl?
curlcommand line that you executed.