• RSS
  • Subscribe

İstatistik

  • Yazılar (3)
  • Yorumlar (1)

Fluent NHibernate 1.1 with Castle Windsor 2.1.1 Version Conflict 

Sunday, June 20, 2010 2:57:38 AM

Castle Windsor 2.1.1 ships with 

Castle.DynamicProxy2 version 2.2.0

Castle.Core version 1.2.0

 

Fluent NHibernate 1.1 ships with 

Castle.DynamicProxy2 version 2.1.0

Castle.Core version 1.1.0

 

When you mix them and overwrite old versions with new ones you will get the following nested exceptions:

 

An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.

 

The type initializer for 'NHibernate.ByteCode.Castle.ProxyFactory' threw an exception.

 

Could not load file or assembly 'Castle.DynamicProxy2, Version=2.2.0.6628, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

 

The solution (as this post suggest) is downloading NHibernate.ByteCode.Castle.dll from ActiveRecord 2.1.1 and overwriting the one ships with Fluent NHibernate 1.1

 

Both of the them is version 2.1.2, but ActiveRecord's one is 0.5 KB bigger :)

 

I Hope this saved some time for you !

 

 

Bunu paylaş.

Never mix agile with traditional design before you go to sleep 

Thursday, June 10, 2010 4:57:53 AM

Last night's favorite nightmare was "sub domain driven design". That thought me a good lesson to not to read traditional books followed by agile stuff just before going to sleep. 

Bunu paylaş.

Complete Guide to redmine on Windows 

Sunday, June 06, 2010 3:12:01 AM

Introduction

I know there are plenty of other tutorials around about installation of redmine on Windows but it turns out that most of them are outdated or didn't work for my environment. 

 

Why redmine ?

Last month I made a survey about Project Management Software (or Project Collaboration Software as I prefer) and found out that redmine is the best way to go. It has some unique features like multiple project support, advanced extensibility, many useful plugins and above all a great community around it. If you want to play with it just go to demo.redmine.org

 

Other Ways to Install

If you are good with mysql and a fresh svn install you may go with the bitnami redmine stack. It wasn't the case for me since I already have VisualSvn installed and I prefer postgresql over mysql.

 

Errors I Hope You Won't Encounter

Numerous rake aborted! errors. One of them was RubyGem version error: rack(1.1.0 not ~> 1.0.1), and other one was Invalid argument!

 

Also this one: Error installing mongrel_service: ERROR: Failed to build gem native extension.

 

I managed to get rid of those, if you stick to the steps below you will avoid them.

 

Step 1 - Install Postgresql

You can install postgresql by using the stand alone installer from postgresql website.

 

There is also another option called Postgres Plus Installer. It will install postgresql and keep it up-to-date if you want so. Download and run the installer. Choose only the following options "Database Server", "pgBouncer", and "pgAgent". In the next page check "Database Installation Tuning". If you want to keep your postgres updated check the "Update Notification Service". You will need a free account with EnterpriseDB for that. After the installation begins you will be asked to check for updates.

 

After setup finishes open pgAdmin and create a database called redmine.

 

Step 2 - Install Ruby

Download and install RubyInstaller for version 1.8.x. NOT the 1.9x one. redmine is only compatible with 1.8.x branch. Also check the option that will add ruby bin folder to command prompt path.

 

Step 3 - Install Rails and Postgres Gems

Run the following commands: 

gem install rails -v=2.3.5

gem install postgres-pr

 

Step 4 - Download and Configure redmind

Download the latest stable version of redmine and extract it to a folder of your choice. Open config/database.yml file and edit the production configuration like this:

 
production:
  adapter: postgresql
  database: redmine
  host: localhost
  username: postgres
  password: xxx
  encoding: utf8

 

Run the following commands:

 

set RAILS_ENV=production

rake generate_session_store

rake db:migrate

rake redmine:load_default_data

 

Step 5 - Create a Windows Service

After running the following commands you will get a windows service named "redmine". You may set it to autostart.
 
gem install mongrel --include-dependencies
gem install mongrel_service --include-dependencies --platform=mswin32
mongrel_rails service::install -N redmine -c [PATH-TO-REDMINE] -p [PORT] -e production
 
Now start the service and navigate to http://localhost:[PORT]. You should see redmine working. Default pass is admin:admin.
 
Step 6 - Configure redmine smtp for gmail.
I always prefer to use gmail apps for outgoing mails for my applications. Since gmail uses tls for smtp you need some tweaks to make it work for redmine. This link shows the right way of doing it but unfortunately I couldn't execute the ruby script/plugin install command So I had to install it manually. From this link download the two ruby files (action_mailer_tls.rb, smtp_tls.rb) and copy them to lib folder in your redmine install path. Next open config\environments\production.rb file and add the two lines:
 
require 'smtp_tls'
require 'action_mailer_tls'
 
Edit your config/email.yml file like below:
 
production:
  delivery_method: :smtp
  smtp_settings:
    tls: true
    address: "smtp.gmail.com"
    port: '587'
    domain: "smtp.gmail.com"
    authentication: :plain
    user_name: "your_email@gmail.com"
    password: "your_password"
 
Navigate to http://localhost:[PORT]/settings and click Email Notifications Tab. At the bottom right corner click "Sent a test mail". You should receive one.
 
Congratulations ! You have a working redmine system now. Please send your corrections and suggestions as comments.




Bunu paylaş.