On Tue, Jan 20, 2009 at 2:51 AM, eF <mich569@gmail.com> wrote:
> actually I followed the post You mentioned, and while I didnt find local.ini
> I changed couch.ini.. so.. how to generate local.ini (where it come from?)
>
That depends on what platform you are installing on. Building from
source on Ubuntu 8.x it is just there. When I installed on FreeBSD 7
from ports, I had to make my own. It is just a text file that doesn't
change when you update, where as the couch.ini file may change. You
need to specify both when starting couchdb
-c \"/usr/local/etc/couchdb/default.ini\" -c
\"/usr/local/etc/couchdb/local.ini\"
The settings from the second config listed, override the 1st. When
you make changes to the configuration via Futon, it modifies the last
config file specified.
In your cmd line. In the above it would be the local.ini
so in your couch.ini (my default.ini) There is the following:
[query_servers]
javascript = /usr/local/bin/couchjs /usr/local/share/couchdb/server/main.js
In your local modifications file (local.ini or the second specified),
create a [query_servers] section like:
[query_servers]
python = /usr/bin/couchpy
you should put the second config file in the same directory as the
first, with the same permissions.
(** if you are just kicking the tires, go ahead and modify the
existing config and don't worry about the creating a second. Just
remember it may be over written when/if you update couchdb.)
Then restart couch and go to the configuration section and you should see
query_servers
javascript /usr/local/bin/couchjs
/usr/local/share/couchdb/server/main.js
python /usr/bin/couchpy
Now go to Custom Query... in a database and enter the following simple
map function
def fun(doc):
yield None, doc
click "Run" and if it works, you are golden.
Remember, couchpy is what you want to point to for the python view
server and not view.py directly. In my installation it is installed
in /usr/bin
which couchpy is your friend, and when you think you have it, try to
run it from the command line with
/usr/bin/couchpy --help
to make sure
Have Fun!
-Jeff
> 2009/1/19 Jeff Hinrichs - DM&T <dundeemt@gmail.com>
>
>>
>>,
>>
>>
>