-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database setup #7
Comments
Hi there Did the 'bundle exec rake db:setup' command work? If yes, the database is initialized and tables are created. If not, here's some background: 'rake db:setup' does create the mysql databases according to 'database.yml' you created out of 'database.yml.example'. It should ask you for the root password for your mysql server to create the databases. This function is provided by Rails and we just use that for Bookyt. It does not always work if there's more than one database is configured in database.yml (like production, test, development) with the same username. So here's a recipe that should probably get you a working DB setup if you used a more or less verbatim copy of database.yml.example:
It that fails, please post the output of the last step here, preferable using a gist. Cheers |
Please check the following gist to look into the problem. Harman |
(Did comment on the gist long time ago, but I'll re-post here as I'm not sure it reached you, @harman052) You need to keep both a test and a development section. They should both have a different user name and database name to get db:create (which is called by db:setup) working properly. The reason there are no tables in the test db is that it failed to do the db:create properly. db:setup actually calls the following tasks: db:create (create databases), db:schema:load (to build the tables), and db:seed (to add some seed data from db/seeds.rb. So when db:create fails (because there is no development section), the other tasks are not run. |
@harman052 okay to close? Or do you need some support? |
On Wed, Jun 26, 2013 at 12:44 AM, Simon Hürlimann
|
…nt-plan-in-accounts AG-709 Define a default account plan in accounts
I was trying to install Bookyt by following your INSTALL file. After database initialize, I didn't find any step to create tables in database. I found db/schema.rb file but I don't know how to use it with MySQL.
Developers are requested to look into the issue ASAP.
The text was updated successfully, but these errors were encountered: