fix environment resolution
dont' test against rails master
fix tests for Rails 2.3