I've just got done updating one of my projects from castle trunk 4044 to trunk 4710 and given the amount of changes thought I would share.
First things first, fix up those compiler errors. I had quite a few, but they were easy and pretty much the same few things:
- Rename IRailsEngineContext to IEngineContext
- Change Filter methods to accept IController and IControllerContext instead of just Controller.
- No more Context.Url, now it is Context.Request.Url
- SetController method on helpers has changed to take IController and IControllerContext instead of Controller.
- Since helpers now use IController instead of Controller there may be several missing methods or properties so just cast it to an instance of Controller.
I'm so glad I have unit tests. When I first ran them I had many failures, but it was one fix:
Error:
Inner Exception
NHibernate.HibernateException
Message: Could not instantiate dialect class
Source: NHibernate
Problem:
The key names for NHibernate configuration have changed
Solution:
Change your ActiveRecord configuration entries from this
<add key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />
to
<add key="connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />
Then to get my site up and running:
Error:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load type 'Castle.MonoRail.Framework.EngineContextModule'
Problem:
There is no more EngineContextModule
Solution:
Remove this from web.config <add name="monorail" type="Castle.MonoRail.Framework.EngineContextModule, Castle.MonoRail.Framework" />
Error:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: An error occurred creating the configuration section handler for Brail: Could not load file or assembly 'Boo.Lang.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=32c39770e9a21a67' or one of its dependencies. The system cannot find the file specified.
Problem:
A new boo assembly has been added
Solution:
Add a reference to Boo.Lang.Extensions to your web project.
Error:
CommonScripts\Extensions.brail(7,9): BCE0044: Boo.Lang.Compiler.CompilerError: expecting "end", found 'except'. ---> CommonScripts\Extensions.brail:7:9: expecting "end", found 'except'
Problem:
I had defined an extension method in one of my brail common scripts that looked like
[Boo.Lang.ExtensionAttribute]
static def IsEmpty(val as duck) as bool:
try:
return true if val is null
return val.GetEnumerator().MoveNext() == false
end
except e as System.MissingMethodException:
return true
end
end
Solution:
[Boo.Lang.ExtensionAttribute]
static def IsEmpty(val as duck) as bool:
try:
return true if val is null
return val.GetEnumerator().MoveNext() == false
except e as System.MissingMethodException:
return true
end
end
Of note:
Because of the new way MonoRail resolves its service container you can remove the useWindsorIntegration flag from your configuration. I think this will also mean you don't need to register a custom logging service as well.