f0y / due_date_reminder

Redmine plugin that sends notifications
Other
29 stars 43 forks source link

translation missing: en.field_reminder_notification #12

Closed anclrej closed 12 years ago

anclrej commented 12 years ago

Having problems using this plugin redmine-2.0 branch on my setup:

Redmine version 2.0.3.stable.10070 Ruby version 1.8.7 (i486-linux) Rails version 3.2.6 due_date_reminder 0.3.1

My default locale is russian

In the profile I see this string "translation missing: en.field_reminder_notification"

When saving settings in my profile I get "Internal error".

In apache logs:

ActiveRecord::UnknownAttributeError (unknown attribute: reminder_notification): lib/redmine/safe_attributes.rb:80:in safe_attributes=' app/controllers/my_controller.rb:54:inaccount'

f0y commented 12 years ago

Did you run database migration for plugin?

On Sun, Aug 26, 2012 at 12:47 AM, anclrej notifications@github.com wrote:

Having problems using this plugin redmine-2.0 branch on my setup:

Redmine version 2.0.3.stable.10070 Ruby version 1.8.7 (i486-linux) Rails version 3.2.6 due_date_reminder 0.3.1

My default locale is russian

In the profile I see this string "translation missing: en.field_reminder_notification"

When saving settings in my profile I get "Internal error".

In apache logs:

ActiveRecord::UnknownAttributeError (unknown attribute: reminder_notification): lib/redmine/safe_attributes.rb:80:in safe_attributes=' app/controllers/my_controller.rb:54:inaccount'

— Reply to this email directly or view it on GitHubhttps://github.com/f0y/due_date_reminder/issues/12.

Best Wishes, Oleg Kandaurov

anclrej commented 12 years ago

I ren bundle exec rake redmine:plugins:migrate RAILS_ENV=production (in /var/www/redmine) Migrating due_date_reminder (Due Date Reminder plugin)...

f0y commented 12 years ago

The last question, do you have the same issue in 2.0.2?

anclrej commented 12 years ago

I don`t have 2.0.2 to test

f0y commented 12 years ago

Ok. The fix will be posted soon.

On Sun, Aug 26, 2012 at 2:02 PM, anclrej notifications@github.com wrote:

I don`t have 2.0.2 to test

— Reply to this email directly or view it on GitHubhttps://github.com/f0y/due_date_reminder/issues/12#issuecomment-8031807.

f0y commented 12 years ago

You wrote:

When saving settings in my profile I get "Internal error". In apache logs: ActiveRecord::UnknownAttributeError (unknown attribute: reminder_notification): lib/redmine/safe_attributes.rb:80:in safe_attributes=' app/controllers/my_controller.rb:54:inaccount'

I've tested the plugin locally and I've found that this error appears when plugin migration has not been executed OR you executed migration on one environment (Production) but server runs on another (development).

f0y commented 12 years ago

Translation works fine for me.

anclrej commented 12 years ago

My info page in Redmine:

Environment: Redmine version 2.0.3.stable.10070 Ruby version 1.8.7 (i486-linux) Rails version 3.2.6 Environment production Database adapter MySQL Redmine plugins: due_date_reminder 0.3.1 redmine_timesheet_extensions 0.1.0

Also apache configuration for Redmine includes "RailsEnv production"

Here is what I do to install the plugin:

  1. extract a directory "f0y-due_date_reminder-f23f05e" with a plugin to "/var/www/redmine/plugins/"
  2. cd /var/www/redmine/
  3. rake redmine:plugins:migrate RAILS_ENV=production "(in /var/www/redmine) /var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/file_utils.rb:9: warning: already initialized constant RUBY /var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/file_utils.rb:86: warning: already initialized constant LN_SUPPORTED Migrating due_date_reminder (Due Date Reminder plugin)... Migrating redmine_timesheet_extensions (Timesheet Extensions Plugin)..."
  4. /etc/init.d/apache2 reload

The problem is there. I added "ENV['RAILS_ENV'] ||= 'production'" line to environment.rb, but without any effect. What else can I check?

f0y commented 12 years ago

It seems that your configuration is correct. Unfortunately, I have completely no experience with setting up Apache.

By default redmine runs in development environment. In case that you incorrectly set up Apache configuration, try to run migration against development environment and check this bug once again.

rake redmine:plugins:migrate RAILS_ENV=production
f0y commented 12 years ago

Do you solve the problem?