Content
You are here:
creation of development table
Added by Mario Ganz over 9 years ago
I’d like to create the development table because my cronjob is constantly mailing me mails complaining about this thing missing.
Ceredentials in my database.yml are inserted and I use this https://www.openproject.org/help/faq/development-questions/ to create the tables in the existing database:
RAILS_ENV=development rake db:create
This job then stops because it demands root@localhost login for the sql database. As said above there is a dev user and a dev table. The login via web frontend into the dev database works.
What am I missing?
Replies (9)
Hi Mario,
do you use our packaged (https://www.openproject.org/open-source/packaged-installation/) or manual installation (https://www.openproject.org/open-source/manual-installation/)?
please paste your
config/database.yml
(skip any sensitive data).I tried the packaged installation but it failed so I used the manual installation. openproject is installed in the home directory of the openproject user.
looks like rails 3.2.21 wants to create the test database whenever you create the development database:
https://github.com/rails/rails/blob/v3.2.21/activerecord/lib/active_record/railties/databases.rake#L637
so the rake task wants to connect to your database server as
root
as specified in thetest:
block of yourdatabase.yml
your options:
database
key form the test database’s configuration (code looks like this should work but i didn’t test)test
block entirelygive it a try and let us know how it goes.
Thanks for helping.
I added a comment on each line of the test config section and created the database and filled it. Everything worked fine.
Though I am still receiving a email per minute from the cron daemon containing this:
Okay, I eliminated this message by now, but I am still receiving an email every minute. Is that supposed to work like this?
please paste the contents of your crontab
Thats the crontab. I think its the default config.
No idea?
hmm, difficult to say. looks to me like there’s a job stuck in the queue that happens to send that email.
could you please provide the last hundred or so lines of the logfiles:
if you’re familiar with sql or the rails console, we could confirm that there’s a job present and which one it is
SQL: select * from delayed_jobs;
Rails Console: Delayed::Job.all
before that you could remove the entry from the crontab to confirm that it’s triggered by the cronjob/delayed_job stuff.