If you are like me, you like your code and at best everything else about your
app to be versioned. This makes setting up a new development environment quick,
and even more important reproducible. So one thing which always bothered me was
setting up external code outside of the application to generate Couchbase views,
web interface, far away from my application code. If you want to know more about
them watch the Couchbase 103 – Views and
Map-Reduce by the way.
like to keep it inside as well, and provide a task to actually set them up for
the given environments. The following quick gist provides a rake task to do
this, adding all views in
config/couchbase_views to Couchbase.
This works great together with dotenv to provide the connection details via
environment variables, but can also depend on any other way to
set up the database connection easily.