-
Notifications
You must be signed in to change notification settings - Fork 17
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 aborted! database configuration does not specify adapter #29
Comments
Sounds like you need to specify the adapter for your database? Also make sure your configuration is correct for the database username, etc. I don't think this error is related to the plugin. Is Redmine able to run its production environment without the plugin installed? I'm assuming you updated the plugin when you updated Redmine. The old version is not compatible with the new version of Redmine. |
Redmine is running fine (even with the plugin installed) and yes, I installed a completely new version of the digest plugin when I reinstalled redmine. Any other suggestions ? |
In the interest in giving you as much information as possible, here is another try, with RAILS_ENV set instead of Rails.env. /usr/share/redmine$ rake redmine:send_digest start=0 days=1 RAILS_ENV=production --trace |
RAILS_ENV is obsolete Did you perform the database migration? I have forgotten that step before myself. |
I did yeah and it completes succesfully. However, I have managed to find a small workaround. I commented out line 47 of digest.rake and now things go through. However, I have to use something like "rake redmine:send_digest start=0 days=1 RAILS_ENV="production" environment="production". The digest now gets sent though :) |
I was being happy too early... It gets sent, but doesn't take into account the parameters, meaning it only sends the digest of the day :(. Could you please help me out with this ? I really do want it to work :(. What can I provide you with to get this sorted ? |
If anyone else is having this problem, I finally figured it out. By commenting out the line I said before (line 47 of the digest.rake), the system was not taking into account my preferences through the command-line anymore. All I had to do is change them in my redmine admin (plugin configurations) and then simply run redmine:send_digest RAILS_ENV=production and everything went through fine. However, I would still consider this a bug somewhere, as i do not think I was supposed to go around it like this. |
Glad you got it working. That function is supposed to read the variables On 9/26/2012 3:34 AM, Joshua Wöhle wrote:
|
I had the exactly same problem as JW described and I have got over it the same way as him. |
Rails.env merely wraps ENV["RAILS_ENV"]. ENV and Rails.env are not equivalent. ref. http://stackoverflow.com/a/2715076 http://api.rubyonrails.org/classes/Rails.html#method-c-env
I have used your plugin for a while on a redmine 1.4.x instance and it was working perfectly fine. Today I upgraded to redmine 2.0.3 and re-installed your plugin. However, for some reason I cannot get it to work.
I am trying out the cron command (to check it's validity) like this :
rake redmine:send_digest start=1 days=1 Rails.env="production"
I tried many variants like
rake redmine:send_digest start=1 days=1 RAILS_ENV="production"
rake redmine:send_digest start=1 days=1 Rails.env=production
rake redmine:send_digest start=1 days=1 RAILS_ENV=production
but I always get the follwoing error :
rake aborted!
'database configuration does not specify adapter
/var/lib/gems/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:45:in
resolve_hash_connection' /var/lib/gems/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:39:in
resolve_string_connection'/var/lib/gems/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:23:in
spec' /var/lib/gems/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:127:in
establish_connection'/var/lib/gems/1.9.1/gems/activerecord-3.2.6/lib/active_record/railtie.rb:82:in
block (2 levels) in <class:Railtie>' /var/lib/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:36:in
instance_eval'/var/lib/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:36:in
execute_hook' /var/lib/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:43:in
block in run_load_hooks'/var/lib/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:42:in
each' /var/lib/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:42:in
run_load_hooks'/var/lib/gems/1.9.1/gems/activerecord-3.2.6/lib/active_record/base.rb:721:in
<top (required)>' /usr/share/redmine/lib/plugins/acts_as_activity_provider/init.rb:2:in
block in <top (required)>'/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in
eval' /usr/share/redmine/config/initializers/00-core_plugins.rb:12:in
block in <top (required)>'/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in
each' /usr/share/redmine/config/initializers/00-core_plugins.rb:2:in
<top (required)>'/var/lib/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in
load' /var/lib/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in
block in load'/var/lib/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in
load_dependency' /var/lib/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in
load'/var/lib/gems/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:588:in
block (2 levels) in <class:Engine>' /var/lib/gems/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:587:in
each'/var/lib/gems/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:587:in
block in <class:Engine>' /var/lib/gems/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:30:in
instance_exec'/var/lib/gems/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:30:in
run' /var/lib/gems/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:55:in
block in run_initializers'/var/lib/gems/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:54:in
each' /var/lib/gems/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:54:in
run_initializers'/var/lib/gems/1.9.1/gems/railties-3.2.6/lib/rails/application.rb:136:in
initialize!' /var/lib/gems/1.9.1/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in
method_missing'/usr/share/redmine/config/environment.rb:14:in
<top (required)>' /usr/share/redmine/plugins/redmine_digest/lib/tasks/digest.rake:32:in
require'/usr/share/redmine/plugins/redmine_digest/lib/tasks/digest.rake:32:in
<top (required)>' /usr/share/redmine/lib/tasks/redmine.rake:89:in
load'/usr/share/redmine/lib/tasks/redmine.rake:89:in
block in <top (required)>' /usr/share/redmine/lib/tasks/redmine.rake:89:in
each'/usr/share/redmine/lib/tasks/redmine.rake:89:in
<top (required)>' /var/lib/gems/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:425:in
load'/var/lib/gems/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:425:in
block in load_tasks' /var/lib/gems/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:425:in
each'/var/lib/gems/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:425:in
load_tasks' /var/lib/gems/1.9.1/gems/railties-3.2.6/lib/rails/application.rb:145:in
load_tasks'/var/lib/gems/1.9.1/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in
method_missing' /usr/share/redmine/Rakefile:7:in
<top (required)>'/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in
load' /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in
load_rakefile'/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:501:in
raw_load_rakefile' /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:82:in
block in load_rakefile'/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in
standard_exception_handling' /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:81:in
load_rakefile'/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:65:in
block in run' /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in
standard_exception_handling'/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in
run' /var/lib/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in
<top (required)>'/usr/local/bin/rake:23:in
load' /usr/local/bin/rake:23:in
I hope you can help me with this :)
The text was updated successfully, but these errors were encountered: