Skip to content
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

rake redmine:backlogs:install failing #387

Closed
datico opened this issue Jan 6, 2012 · 7 comments
Closed

rake redmine:backlogs:install failing #387

datico opened this issue Jan 6, 2012 · 7 comments

Comments

@datico
Copy link

datico commented Jan 6, 2012

Hi,
Trying to upgrade from v0.6.5 to v0.7.1 or to master per the instructions on http://www.redminebacklogs.net/en/installation.html under "Optional: Getting the latest code" and when I run rake redmine:backlogs:install I get a few deprecated messages but then ultimately:
rake aborted!
Mysql::Error: Table 'railsapp_development.enumerations' doesn't exist: SHOW FIELDS FROM 'enumerations'

I'm new to rails, trying to learn the ropes here so if there is more info I can provide let me know what and how to find it.

I'm wondering if this is related to the version of Redmine I'm running (1.2.1 stable)...or perhaps to the way I updated either it, rails packages and dependencies, or installed other plugins etc in the past.

@retorquere
Copy link
Contributor

That table belongs to redmine itself. Looks like your database got
corrupted somehow.

@datico
Copy link
Author

datico commented Jan 6, 2012

Ok, that helps. I went poking and found my railsapp_development database is completely empty but railsapp_production has all the tables. I have seen mention of rails or redmine having a dev vs prod mode....is this related and how can I switch it so the rake command works on prod?

@retorquere
Copy link
Contributor

Yes, it's related. If you have an existing production environment you do not want to go screwing about. But the easiest way (that I've used for my dev, not production environment) is to simply set the entries for development and production in config/database.yml in your redmine directory to be the same.

Generally, you need to have redmine up and running before you can install backlogs.

@datico
Copy link
Author

datico commented Jan 6, 2012

Ok, thanks so much.
FYI I am using Turnkey Linux which is defaulted to use the prod env for rails. I simply have different virtual servers for dev vs prod. So far, all my plugins including Backlogs v0.6.5 everything has worked fine and I haven't had to worry about dev/prod env switching. Why this rake task decided to use development env I'm not sure. Anyway we installed Backlogs 0.6.5 a while ago and have been playing with it and like it a lot, but I found another bug and figured I should grab the latest code and try again before reporting it.

@datico
Copy link
Author

datico commented Jan 6, 2012

Did some more digging....this isn't related to line 9-ish in redmine_backlogs/lib/tasks/install.rake is it?
ENV["RAILS_ENV"] ||= "development"

@datico datico closed this as completed Jan 6, 2012
@datico
Copy link
Author

datico commented Jan 6, 2012

Final update and I'm closing as this is not a bug per-se:
Changing the line in install.rake did nothing, so I changed it back. Finally found you can set the env when calling rake:
rake redmine:backlogs:install RAILS_ENV="production"
This worked great. Don't know if you want to update http://www.redminebacklogs.net/en/installation.html or not with the tip...it's probably something obvious that I should have known. Thanks again for your help and very quick responses!

@retorquere
Copy link
Contributor

I've added it to the installer instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants