Hi,
I’m currently looking at pulling the ActsAsReadonlyable plugin into my
rails project but im getting an error when i attempt to run this is
development mode as in the console says: No db config entry defined for
read_only.
The setup prior to the plugin was:
development:
adapter: mysql
host: 127.0.0.1
encoding: utf8
database: dbv2
username: root
password:
readonlydb_development:
adapter: mysql
host: 127.0.0.1
encoding: utf8
database: dbv2
username: root
password:
any ideas?
Chris
Hi Bill,
So now I have:
development:
adapter: mysql
host: 127.0.0.1
encoding: utf8
database: dbv2
username: root
password:
read_only:
adapter: mysql
host: 127.0.0.1
encoding: utf8
database: bv2
username: root
password:
… but I’m still getting the same error in the console. I’ve tried
rebooting and loading up the plugin again but to no success.
Hi Chris,
Chris G. wrote:
encoding: utf8
database: dbv2
username: root
password:
Change this:
readonlydb_development:
To this:
:readonly
adapter: mysql
host: 127.0.0.1
encoding: utf8
database: dbv2
username: root
password:
You don’t need to identify the entry as belonging to a particular
environment. The plugin parses database.yml in sections by environment.
Here’s what the development section of mine looks like. It works fine.
development:
adapter: mysql
database: wcpublic_development
username: root
password:
host: localhost
read_only:
adapter: mysql
database: wcpublic_development
username: root
password:
host: localhost
Best regards,
Bill
Actually it all seems to work fine now. I may have had an issue with the
.yml file not being parsed correctly.
Thanks for your help
Chris