title: Redmine 1.4 Repository Creation Issue
body: <p>When I try to create a Mercurial Repository for a Project in Redmine 1.4 I am getting the following error: It used to work perfectly fine with Redmine 1.3</p>
  
  <pre><code>Rendering /var/redmine/public/500.html (500 Internal Server Error)
  
  
  Processing RepositoriesController#create (for 117.201.161.229 at 2012-04-19 00:58:17) [POST]
    Parameters: {"controller"=&gt;"repositories", "commit"=&gt;"Create", "repository_scm"=&gt;"Git", "authenticity_token"=&gt;"D9c30kq2pf/mhM3iGcCvRNykEFamKuFddJXEs+xmSEo=", "action"=&gt;"create", "repository"=&gt;{"url"=&gt;"/home/nettantra_base/domains/hg.nettantra.com/repos/nt-test", "checkout_display_command"=&gt;"0", "path_encoding"=&gt;"", "identifier"=&gt;"", "checkout_description"=&gt;"The data contained in this repository can be downloaded to your computer using one of several clients.\r\nPlease see the documentation of your version control software client for more information.\r\n\r\nPlease select the desired protocol below to get the URL.\r\n", "checkout_overwrite"=&gt;"0", "is_default"=&gt;"1", "checkout_protocols"=&gt;{"-1"=&gt;{"protocol"=&gt;"empty"}, "0"=&gt;{"fixed_url"=&gt;"", "access"=&gt;"permission", "command"=&gt;"git clone", "protocol"=&gt;"Git", "is_default"=&gt;"1"}}, "extra_report_last_commit"=&gt;"0"}, "project_id"=&gt;"test-project"}
  
  NoMethodError (undefined method `project=' for nil:NilClass):
    app/controllers/repositories_controller.rb:49:in `create'
    passenger (3.0.11) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
    passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
    passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
    passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
    passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
    passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
    passenger (3.0.11) lib/phusion_passenger/utils.rb:479:in `safe_fork'
    passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:180:in `start'
    passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
    passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
    passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
    passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
    passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
    passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
    passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
    passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    passenger (3.0.11) helper-scripts/passenger-spawn-server:99
  
  Rendering /var/redmine/public/500.html (500 Internal Server Error)
  </code></pre>