Open aliramw opened 8 years ago
@marilawang: You problably missed db migration after upgrade, newer version introduces ability to set up theme per user and You seems to miss that.
I have run
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
Did that created "code_theme_user_settings" table in db? I just checked again 2.4, 2.6 and 3.1 and it works everywhere without error
Not work too
Migrating redmine_highlightjs (Syntax highlighting with highlightjs)...
== 2 CreateCodeThemeUserSettings: migrating ===================================
-- create_table(:code_theme_user_settings)
-> 0.4642s
== 2 CreateCodeThemeUserSettings: migrated (0.4645s) ==========================
Error:
ActiveRecord::RecordNotFound (Couldn't find all CodeThemeUserSettings with 'id': (first, {:conditions=>["user_id = ?", 1]}) (found 0 results, but was looking for 2)):
What versions are You running now?
1.0.2
What Ruby & Redmine version? :) I just checked and it's working on redmine2.4 + ruby 2.1.5
Environment:
Redmine version 3.1.1.stable
Ruby version 1.9.3-p194 (2012-04-20) [x86_64-linux]
Rails version 4.2.4
Environment production
Database adapter PostgreSQL
Plugin v1.0.1 work, v1.0.2 not
Krakozaber: plugin v.1.0.1 don't have option to redefine theme by user in his account settings, and Your error is about that option. On my tested versions error is not raised when nothing is found, so I didn't needed to catch it. I'll take some time to make plugin compatible to work with code review, and try to reproduce this, it should be easy to fix, but I need to see it :)
I was able to reproduce that and to fix it (I hope) Please review it :) (v1.0.3)
Hello people! I had the same issue.
Well, looking carefully the redmine migration, the tables were not created. Without them, when processing the account details page, an db error is masked by 404 error.
The reason? In the installation instructions of the main page, the plugin directory name is missing the letter "t" in the name: "redmine_highlighjs" should be "redmine_highlightjs".
To solve the problem, please follow these commands (at the redmine dir):
$rake redmine:plugins:migrate NAME=redmine_highlightjs VERSION=0 RAILS_ENV=production
$mv plugins/redmine_highlighjs/ plugins/redmine_highlightjs
$bundle exec rake redmine:plugins:migrate RAILS_ENV=production
I have already changed the README.md on my fork and submitted an pull request. I think that will solve the problem.