SQLLite works by having the Rails process write to a system file within the Rails directory tree. The Rails process is owned by Apache, which sets a user "apache" and a group "apache" by default. To make it work you would need to give write permissions to the apache user or group on the /db directory.
OR
Configure apache to run with a group already having write permissions to the directory. A good strategy is to create a group of the various processes that may need access to various locations -- for example I have a "deployer" group that the user doing releases would be part of, along with the apache instance. I typically find that having a group that the various process and login users are part of makes life easier (e.g. for looking at server logs), writing uploads or cached files, etc.
AND/OR
Use a real database server like PostgreSQL or MySQL -- they work because they are their own processes that manage their own files. The Rails process (apache, in your case) connects to the database server process on a Unix port. Each server process securely manages only files it knows about.
SQLLite is fine to get started -- super easy and low overhead, but very soon you'll need to run a regular database server on production. And then you'll soon find that things aren't exactly the same between SQLLite and the others, at which point you should just install the same database server on your dev machine.