ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

ActiveRecord::ConfigurationError when showing user id

Added by George Plymale at 2011-08-24 06:26 am

When attempting to click on a username in a project (such as the username in an issue like: "Added by <username> x minutes ago.") I'm receiving the following error in the log for any user ID number:

Processing UsersController#show (for 192.168.0.5 at 2011-08-24 01:55:41) [GET]
  Parameters: {"action"=>"show", "id"=>"3", "controller"=>"users"}

ActiveRecord::ConfigurationError (Association named 'project' was not found; perhaps you misspelled it?):
  lib/redmine/activity/fetcher.rb:82:in `events'
  lib/redmine/activity/fetcher.rb:81:in `each'
  lib/redmine/activity/fetcher.rb:81:in `events'
  lib/redmine/activity/fetcher.rb:80:in `each'
  lib/redmine/activity/fetcher.rb:80:in `events'
  app/controllers/users_controller.rb:68:in `show'
  thin (1.2.11) lib/thin/connection.rb:84:in `pre_process'
  thin (1.2.11) lib/thin/connection.rb:82:in `catch'
  thin (1.2.11) lib/thin/connection.rb:82:in `pre_process'
  thin (1.2.11) lib/thin/connection.rb:57:in `process'
  thin (1.2.11) lib/thin/connection.rb:42:in `receive_data'
  eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
  eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
  thin (1.2.11) lib/thin/backends/base.rb:61:in `start'
  thin (1.2.11) lib/thin/server.rb:159:in `start'
  thin (1.2.11) lib/thin/controllers/controller.rb:86:in `start'
  thin (1.2.11) lib/thin/runner.rb:185:in `send'
  thin (1.2.11) lib/thin/runner.rb:185:in `run_command'
  thin (1.2.11) lib/thin/runner.rb:151:in `run!'
  thin (1.2.11) bin/thin:6
  /usr/local/bin/thin:19:in `load'
  /usr/local/bin/thin:19

Any ideas as to what is going wrong here?

BTW, attempting to format something with the C icon at the top which surrounds text with @ for code seems to fail when I preview it. Apparently an error in formatting presently?

Thanks much,

-George


Replies (5)

RE: ActiveRecord::ConfigurationError when showing user id - Added by Felix Schäfer at 2011-08-24 07:05 am

Very odd. Do you have any plugin installed? Could you try if you get the same error with mongrel (script/server) instead of thin?

Not sure what you mean with the C and @ part at the end, care to elaborate?

RE: ActiveRecord::ConfigurationError when showing user id - Added by George Plymale at 2011-08-24 02:37 pm

I do have a few plugins enabled:
  • redmine_todos_plugin
  • stuff_to_do_plugin
  • redmine_github_hook
  • redmine_kanban

Will check script/server a bit later here once users are not in the system.

On the C / part it is regarding the formatting of messages here. They are not, it seems, displaying the markdown appropriately when I preview messages with these demarkation attributes. So for example, when I want to display inline code here in a message by pressing the C button, it only displays literally "@blah blah my code" when the text is multiline rather than being actually formatted as a monospaced typeface. Perhaps inline code line breaks are not supposed to be formatted as such?

RE: ActiveRecord::ConfigurationError when showing user id - Added by Felix Schäfer at 2011-08-24 02:42 pm

George Plymale wrote:

I do have a few plugins enabled:
  • redmine_todos_plugin
  • stuff_to_do_plugin
  • redmine_github_hook
  • redmine_kanban

What version of ChiliProject are you on? If you're on 2 or later, see if any of the plugins has a acts_as_activity statement in it. If so, it's probably not been updated for ChiliProject 2.

On the C / part it is regarding the formatting of messages here. They are not, it seems, displaying the markdown appropriately when I preview messages with these demarkation attributes. So for example, when I want to display inline code here in a message by pressing the C button, it only displays literally "@blah blah my code" when the text is multiline rather than being actually formatted as a monospaced typeface. Perhaps inline code line breaks are not supposed to be formatted as such?

Yes, the @ syntax doesn't take multilines, you have to use the < pre>< /pre> (spaces added to avoid them firing) syntax for multiple lines.

RE: ActiveRecord::ConfigurationError when showing user id - Added by George Plymale at 2011-08-24 03:14 pm

Thanks for instructing me as to how to find those plugins. redmine_todos_plugin indeed has this present.

I am also seeing this in acts_as_journalized & acts_as_activity_provider, however since these are not add ons by me I'm assuming that those are appropriate for now.

Might I ask how would you properly remove a plugin? I did find with this same todos_plugin as well that on the db update after going from 2.0 to 2.1.1 that the db migrations attempt to create a db and fail so I had to remove those when updating.

RE: ActiveRecord::ConfigurationError when showing user id - Added by Felix Schäfer at 2011-08-24 03:23 pm

George Plymale wrote:

Thanks for instructing me as to how to find those plugins. redmine_todos_plugin indeed has this present.

Then there's a 99% chance it hasn't been updated yet and thus incompatible. Try to deactivate it (give the folder 000 permissions and restart your server) and see if it works without it.

I am also seeing this in acts_as_journalized & acts_as_activity_provider, however since these are not add ons by me I'm assuming that those are appropriate for now.

acts_as_journalized replaces acts_as_versioned and wraps acts_as_activity_provider, the later meaning especially that no code should need to call it on its own, and inversely code calling it probably does it "the old way" and is thus incompatible.

Might I ask how would you properly remove a plugin? I did find with this same todos_plugin as well that on the db update after going from 2.0 to 2.1.1 that the db migrations attempt to create a db and fail so I had to remove those when updating.

If you just want to remove the plugin, removing the directory is enough. If you want to also remove any data the plugin has created in the DB, run rake db:migrate:plugin NAME=name_of_the_directory VERSION=0. This will run the down migrations of the plugin, which if the author created them the standard way will contain instructions to remove its data from the DB, make sure to have a backup though, you never know! For completeness, I'll also point to the plugin's assets that are copied to public/plugins/plugin_name (or something like that), but there's very little chance they'll bother you in the future.

(1-5/5)