Wednesday, February 18, 2015

undefined method `user_url' for #<DeviseCustom::RegistrationsController:

I ran into this error when trying to work on a user profile edit page that used Devise.

The error is actually a red herring; what it means is that your update of the user failed or didn't do what you expected, and it's trying to fall back to a default page.

Take a look at your user save methods and callbacks and confirm that the user method is doing what you expect. In my particular case, I had a before_validation callback that set a field on the user that happened to be false. The callback returned that false and mistakenly interpreted it as a failure. So I had to explicitly return true to indicate that the method succeeded.

Friday, February 6, 2015

internal error (got unexpected object kind 'commit')

Trac's Git plugin will sometimes produce error messages on submodules or other obscure Git structures, reporting:
"internal error (got unexpected object kind 'commit')"
when you attempt to browse them. It's suspected this is due to Git submodules.

We fixed this by manually applying this patch to the 0.11 version of the plugin:

I've also added an image of it here, just in case the web site goes away.