I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Bug #2040

ActionView::Template::Error (undefined method `new_record?' for nil:NilClass)

Added by Andriy Lesyuk almost 12 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Major
Assignee:
Target version:
Start date:
28 May 2012
Due date:
06 Jun 2012
% Done:

100%

Redmine version:
External issue:

Description

Previous description

It’s hard time adding support for Redmine 2.0 and Rails 3...

Now

Error on repository creation - see discussion at the bottom.


Related issues

Related to SCM Creator (+Github) - Translation #2001: German Translation Closed 29 Feb 2012 24 May 2012
Related to SCM Creator (+Github) - Bug #1800: UnknownAttributeError 'extra_report_last_commit' when adding an existing git repository in redmine Closed 10 Jul 2011 19 Sep 2011

Associated revisions

Revision 107 (diff)
Added by Andriy Lesyuk almost 12 years ago

Changed sample values in scm.yml, added debugs for #2040

Revision 108 (diff)
Added by Andriy Lesyuk almost 12 years ago

Other debugs for #2040 + CREDITS update

Revision 109 (diff)
Added by Andriy Lesyuk almost 12 years ago

Fixed #2040 and added error if repository had not been created

Revision 111 (diff)
Added by Andriy Lesyuk almost 12 years ago

Added debug for #2040 and Lluís

Revision 114 (diff)
Added by Andriy Lesyuk almost 12 years ago

Redmoved debug (#2040)

History

#1 Updated by Takashi Okamoto almost 12 years ago

I migrate Redmine SCM Creator plugin on GitHub.
I’m not ready to feed back patch but I would like to
share my code. Please check here:

https://github.com/okamototk/redmine_scm_creator

My fork seems basically work well.

#2 Updated by Andriy Lesyuk almost 12 years ago

  • % Done changed from 0 to 80

#3 Updated by Takashi Okamoto almost 12 years ago

I updated the patch. Please see following repo.

https://github.com/okamototk/redmine_scm_plugin

I tested on Redmine 2.0.x and Redmine 1.3.x.
I awared there were deleting repository code but it not worked.

I think my modification is enough to merge your code now.

best regards,

#4 Updated by Andriy Lesyuk almost 12 years ago

  • Due date set to 06 Jun 2012
  • Status changed from In Progress to Closed
  • Target version set to 0.4.0
  • % Done changed from 80 to 100

#5 Updated by Takashi Okamoto almost 12 years ago

I tested on Ruby1.9.3 and Redmine 2.0.1. I had still problem.

1. de.yml should be fixed (please see my de.yml in GitHub)

Started GET "/" for 192.168.10.146 at 2012-06-08 03:02:00 +0900
Processing by WelcomeController#index as HTML
  Rendered welcome/index.html.erb within layouts/base (311.8ms)
Completed 500 Internal Server Error in 336ms

ActionView::Template::Error (No such file or directory - /opt/alminium/plugins/redmine_scm_plugin/config/locales/de.yml):
    1: <h2><%= l(:label_home) %></h2>
    2: 
    3: <div class="splitcontentleft">
    4:   <%= textilizable Setting.welcome_text %>
  lib/redmine/i18n.rb:10:in `l'
  app/views/welcome/index.html.erb:1:in `_app_views_welcome_index_html_erb__2365828710449361724_40857840'

2. After resolve above probem, got folloing error:

Started POST "/projects/ggg/repositories" for 192.168.10.146 at 2012-06-08 03:03:07 +0900
Processing by RepositoriesController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"JO/0TpTyTIVt/BRicfORzQts1Q4xrosUFtJXyfrYwes=", "repository_scm"=>"Git", "repository"=>{"is_default"=>"0", "identifier"=>"kkk", "url"=>"/var/opt/alminium/git/ggg.1", "path_encoding"=>"", "extra_report_last_commit"=>"0"}, "commit"=>"リポジトリの作成", "operation"=>"add", "project_id"=>"ggg"}
  Rendered plugins/redmine_scm_plugin/app/views/repositories/_form.html.erb (190.0ms)
  Rendered repositories/new.html.erb within layouts/base (193.6ms)
Completed 500 Internal Server Error in 217ms

ActionView::Template::Error (undefined method `new_record?' for nil:NilClass):
    20: 
    21: <p>
    22:   <% unless ScmConfig['only_creator'] %>
    23:   <%= submit_tag(@repository.new_record? ? l(:button_create) : l(:button_save), :disabled => button_disabled) %>
    24:   <% end %>
    25:         <%= link_to l(:button_cancel), settings_project_path(@project, :tab => 'repositories') %>
    26: </p>
  app/views/repositories/new.html.erb:4:in `block in _app_views_repositories_new_html_erb___3757932613546815684_64689100'
  app/helpers/application_helper.rb:950:in `labelled_form_for'
  app/views/repositories/new.html.erb:3:in `_app_views_repositories_new_html_erb___3757932613546815684_64689100'

#6 Updated by Andriy Lesyuk almost 12 years ago

  • Status changed from Closed to Reopened

Yeah... I noticed the second exception. I hope I have fixed it already with the very recent commit. Had no chance to test it however.

Regarding the first issue - I’m a little bit confused... I used it as it is from #2001. Are you sure the translation send by user is broken? As I understood you tested German translation?

#7 Updated by Andriy Lesyuk almost 12 years ago

Btw, I’m very close to finishing update and making final tests...

#8 Updated by Andriy Lesyuk almost 12 years ago

There was a typo in r95... Fixed in r100

#9 Updated by Takashi Okamoto almost 12 years ago

I didn’t test german. When I use Japanese locale, Redmine load all of locale files.
de.yml seem it includes invalid character. After I translate correct utf-8, it works.

Please replace following file.

https://github.com/okamototk/redmine_scm_plugin/blob/master/config/locales/de.yml

#10 Updated by Andriy Lesyuk almost 12 years ago

Already did! Thanks!

#11 Updated by Takashi Okamoto almost 12 years ago

I update HEAD and test again. Create repository when creating project was fine.
However create subrepository was not work with following error:

```
Started POST "/projects/zzzz/repositories” for 192.168.10.146 at 2012-06-09 23:13:19 +0900
Processing by RepositoriesController#create as HTML
Parameters: {“utf8"⇒“✓“, “authenticity_token"⇒“YAuyQSjV6TgUHW8gD+OvmEQUZX0mFEHnuzV+sW/+X60=”, “repository_scm"⇒“Git”, “repository"⇒{“is_default"⇒“0”, “identifier"⇒“yyy”, “url"⇒"/var/opt/alminium/git/zzzz.1”, “path_encoding"⇒“”, “extra_report_last_commit"⇒“0”}, “commit"⇒“リポジトリの作成”, “operation"⇒“add”, “project_id"⇒“zzzz”}
Rendered plugins/redmine_scm_plugin/app/views/repositories/_form.html.erb (47.9ms)
Rendered repositories/new.html.erb within layouts/base (52.2ms)
Completed 500 Internal Server Error in 264ms

ActionView::Template::Error (undefined method `new_record?' for nil:NilClass):
19: </div>
20:
21: <p>
22: <%= submit_tag(@repository.new_record? ? l(:button_create) : l(:button_save), :id ⇒ 'repository_save’, :disabled ⇒ button_disabled) %>
23: <%= link_to l(:button_cancel), settings_project_path(@project, :tab ⇒ 'repositories’) %>
24: </p>
app/views/repositories/new.html.erb:4:in `block in app_views_repositories_new_html_erb_597052083313712535_53784360’
app/helpers/application_helper.rb:950:in `labelled_form_for’
app/views/repositories/new.html.erb:3:in `_app_views_repositories_new_html_erb__597052083313712535_53784360’
```

#12 Updated by Andriy Lesyuk almost 12 years ago

Hm... This can be solved by adding condition @repository && @repository.new_record?:

<%= submit_tag((@repository && @repository.new_record?) ? l(:button_create) : l(:button_save), :id ⇒ 'repository_save’, :disabled ⇒ button_disabled) >

But I would like to check what is causing it...

#13 Updated by Andriy Lesyuk almost 12 years ago

Hm... I can’t reproduce this bug...

What I’m doing? Just adding any existing repository using core “Create” button...

#14 Updated by Lluís - almost 12 years ago

I can reproduce in Debian stable + redmine 1.4.2+dfsg1-1 (testing) + redmine_scm rev106:
Project → <project> → Settings → Repositories → New repository.

This is performed on a project that was created using a previous redmine version and had an already-existing repository
(which is now marked as the “main” repository). Doing it on a newly-created project shows the same behaviour.

After adding the change in note 12, clicking “Create new repository” just brings me back to the “New repository” page,
while the “Create” button is disabled. After the first “failed” click to “Create new repository”, the “Create” button is enabled,
but it behaves exactly the same as clicking “Create new repository” (aka, gets me back to the “New repository” page).

BTW, there are 3 ".patch” files in redmine_scm, am I supposed to do something with them?

Thanks,
Lluis

#15 Updated by Andriy Lesyuk almost 12 years ago

You mean you get same error when you click on “New repository” link or when you click on “Create” button?

BTW, there are 3 ".patch” files in redmine_scm, am I supposed to do something with them?

No. Just ignore them!.. They are for very rare cases when RHTML files were modified by other plugins or manually.

#16 Updated by Lluís - almost 12 years ago

Andriy Lesyuk wrote:

You mean you get same error when you click on “New repository” link or when you click on “Create” button?

When I click the “New repository” link in the “Repositories” tab, I get redirected to a page titled “New repository”.

So, clicking both “Create” (bottom of the page, not clickable the first time) or “Create new repository” (at the right of
the path for the repository) buttons redirects me again to the page titled “New repository”.

#17 Updated by Andriy Lesyuk almost 12 years ago

And in logs you get such error?.. I thought you get 500 Internal Server Error?..

#18 Updated by Lluís - almost 12 years ago

I was getting a 500 error until I tried the fix you proposed in note 12 (checking if @repository is null). After that change I get the behaviour I explained in the previous posts.

Thanks!

#19 Updated by Andriy Lesyuk almost 12 years ago

Oh... I need more information to resolve this issue as the fix from 12th note does not really resolve it.

So initially did you get 500 error when clicking on “New repository” link or when clicking on “Create” button?

Could you please also confirm that in logs you have the same:

ActionView::Template::Error (undefined method `new_record?' for nil:NilClass):

Can’t understand why I can’t reproduce it...

Also I’m going to add debug output to logs and ask you to run once again and tell me what output is there... Will you be able to help this way?

#20 Updated by Andriy Lesyuk almost 12 years ago

Done! Please update from SVN and give me logs.

#21 Updated by Lluís - almost 12 years ago

Andriy Lesyuk wrote:

Oh... I need more information to resolve this issue as the fix from 12th note does not really resolve it.

So initially did you get 500 error when clicking on “New repository” link or when clicking on “Create” button?

I get the error when clicking the “Create new repository” button in the “New repository” page. As I said, the first time I get
into the “New repository” page, the “Create” button (at the bottom) is disabled.

Could you please also confirm that in logs you have the same:

This is the error:

ActionView::TemplateError (undefined method `new_record?' for nil:NilClass) on line #22 of vendor/plugins/redmine_scm/app/views/repositories/_form.html.erb

Also I’m going to add debug output to logs and ask you to run once again and tell me what output is there... Will you be able to help this way?

Sure, I’ll check later.

#22 Updated by Lluís - almost 12 years ago

Andriy Lesyuk wrote:

Done! Please update from SVN and give me logs.

Without the fix in note 12:

Processing RepositoriesController#create (for ... at ...) [POST]
  Parameters: {"project_id"=>"test", "action"=>"create", "authenticity_token"=>"...", "commit"=>"Create new repository", "controller"=>"repositories", "repository"=>{"path_encoding"=>"", "url"=>"/home/code/git/test.1", "identifier"=>"foo", "checkout_overwrite"=>"0", "checkout_description"=>"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", "is_default"=>"0", "extra_report_last_commit"=>"0", "checkout_protocols"=>{"0"=>{"fixed_url"=>"", "access"=>"permission", "is_default"=>"1", "protocol"=>"Git", "command"=>"git clone"}, "-1"=>{"protocol"=>"empty"}}, "checkout_display_command"=>"1"}, "repository_scm"=>"Git", "operation"=>"add"}
 >>> inside customized code
 >>> :pickup_extra_info undefined
 >>> @repository is nil
Rendering template within layouts/base
Rendering repositories/new

ActionView::TemplateError (undefined method `new_record?' for nil:NilClass) on line #22 of vendor/plugins/redmine_scm/app/views/repositories/_form.html.erb:
19: </div>
20: 
21: <p>
22:   <%= submit_tag(@repository.new_record? ? l(:button_create) : l(:button_save), :id => 'repository_save', :disabled => button_disabled) %>
23:     <%= link_to l(:button_cancel), settings_project_path(@project, :tab => 'repositories') %>
24: </p>

With the fix:

Processing RepositoriesController#create (for ... at ...) [POST]
  Parameters: {"operation"=>"add", "controller"=>"repositories", "repository"=>{"is_default"=>"0", "identifier"=>"foo", "url"=>"/home/code/git/test.1", "checkout_overwrite"=>"0", "path_encoding"=>"", "checkout_protocols"=>{"0"=>{"command"=>"git clone", "is_default"=>"1", "access"=>"permission", "protocol"=>"Git", "fixed_url"=>""}, "-1"=>{"protocol"=>"empty"}}, "checkout_description"=>"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", "extra_report_last_commit"=>"0", "checkout_display_command"=>"1"}, "project_id"=>"test", "authenticity_token"=>"...", "commit"=>"Create new repository", "action"=>"create", "repository_scm"=>"Git"}
 >>> inside customized code
 >>> :pickup_extra_info undefined
 >>> @repository is nil
Rendering template within layouts/base
Rendering repositories/new
Completed in 21ms (View: 16, DB: 1) | 200 OK [https://...]

#23 Updated by Andriy Lesyuk almost 12 years ago

Hm... It’s a kind of weird...

You see - the code which raises error is actually the code from Redmine 1.4.x... In other words if it works without plugin it should work with it:

                        if attrs[:attrs_extra].keys.any?
                            @repository.merge_extra_info(attrs[:attrs_extra])
                        end
                    else
                        @repository = Repository.factory(params[:repository_scm], params[:repository]) # FIXME: returns nil
                    end

                    if @repository
                        @repository.project = @project

My guess is that some other plugin is "helping" here...

Please give me the list of plugins you have installed.

#24 Updated by Daniel Stonier almost 12 years ago

Just to confirm, I’m hitting the same error that Andriy is seeing when I hit the “Create New Repository” button when making a new git repository.

#25 Updated by Andriy Lesyuk almost 12 years ago

Lluís, as I understood you used Checkout plugin? Could you please try again with this plugin disabled?

Daniel, what version of Redmine? Which other plugins are you using? Please also paste what you get in logs.

Takashi, are you still experiencing the issue?

#26 Updated by Daniel Stonier almost 12 years ago

  • Redmine Version: 2.0.2
  • Plugin: projects_tree_view
  • Plugin: redmine_issue_due_date
  • Plugin: redmine_scm
  • Redmine Scm : Revision 107

Creation Process:

  • Create new project 'Testies’ with identifier 'testies’
  • Go to project settings, enable module 'repositories’
  • Go to Settings→Repositories and click 'New Repository’
  • Select 'Git’, set Identifier to 'testies’ and click 'Create new repository’

Debug info from the logs:


Started POST "/projects/testies/repositories" for 192.168.10.66 at Thu Jun 14 18:32:02 +0900 2012
Processing by RepositoriesController#create as HTML
  Parameters: {"repository"=>{"url"=>"/mnt/zaphod/servers/scm/git/testies.git", "extra_report_last_commit"=>"0", "path_encoding"=>"", "identifier"=>"testies", "is_default"=>"1"}, "authenticity_token"=>"K483xTEEgPFzcWJvZcR8LuYqbWhc+IPFOnEcwFMkn0w=", "commit"=>"Create new repository", "operation"=>"add", "repository_scm"=>"Git", "utf8"=>"✓", "project_id"=>"testies"}
   (0.3ms)  SELECT MAX(`settings`.`updated_on`) AS max_id FROM `settings` 
  User Load (0.2ms)  SELECT `users`.* FROM `users` WHERE `users`.`type` IN ('User', 'AnonymousUser') AND `users`.`id` = ? AND (users.status = 1) LIMIT 1  [["id", 3]]
  Project Load (0.3ms)  SELECT `projects`.* FROM `projects` WHERE `projects`.`identifier` = 'testies' LIMIT 1
  EnabledModule Load (0.2ms)  SELECT name FROM `enabled_modules` WHERE `enabled_modules`.`project_id` = 82
 >>> inside customized code
 >>> :pickup_extra_info undefined
 >>> @repository is nil
  Rendered plugins/redmine_scm/app/views/repositories/_form.html.erb (38.2ms)
  Rendered repositories/new.html.erb within layouts/base (39.5ms)
Completed 500 Internal Server Error in 50ms

ActionView::Template::Error (undefined method `new_record?' for nil:NilClass):
    19: </div>
    20: 
    21: <p>
    22:   <%= submit_tag(@repository.new_record? ? l(:button_create) : l(:button_save), :id => 'repository_save', :disabled => button_disabled) %>
    23:         <%= link_to l(:button_cancel), settings_project_path(@project, :tab => 'repositories') %>
    24: </p>
  app/views/repositories/new.html.erb:4:in `_app_views_repositories_new_html_erb__2117297981_70290553025200'
  app/helpers/application_helper.rb:950:in `labelled_form_for'
  app/views/repositories/new.html.erb:3:in `_app_views_repositories_new_html_erb__2117297981_70290553025200'

My scm.yml (the pre,post scripts are just the default templates suggested here in this wiki)


production:
  deny_delete: false
  auto_create: false
  force_repository: true
  pre_create: /usr/local/bin/pre-create.sh
  post_create: /usr/local/bin/post-create.sh
  pre_delete: /usr/local/bin/pre-delete.sh
  post_delete: /usr/local/bin/post-delete.sh
  max_repos: 0
  only_creator: false
  allow_add_local: false
  allow_pickup: false
  svn:
    path: /mnt/zaphod/servers/scm/svn
    svnadmin: /usr/bin/svnadmin
    url: http://svn.yujin.com
  git:
    path: /mnt/zaphod/servers/scm/git
    git: /usr/bin/git
    options: --bare
    url: http://git.yujin.com
    update_server_info: true
    git_ext: true
    append: trunk
  mercurial:
    path: /mnt/zaphod/servers/scm/mercurial
    hg: /usr/bin/hg
  bazaar:
    path: /mnt/zaphod/servers/scm/bazaar
    bzr: /usr/bin/bzr
    init: init-repository
    log_encoding: UTF-8

Some variations on the use case:

1)

  • Select 'Git’ and set the identifier to 'testies’ then click 'Create’
  • Result is 'Adding local repositories was denied by the administrator’

2)

  • Select 'Git’, do not set an identifier and click 'Create’
  • Result is the same error as above.

3)

  • Select 'Git’, do not set an identifier and click 'Create new repository’
  • Result is the same error as above.

#27 Updated by Andriy Lesyuk almost 12 years ago

Thanks, Daniel! Could you please try again with the latest revision r108?.. And give me what it writes to logs.
It will also give error but another kind of error...

#28 Updated by Andriy Lesyuk almost 12 years ago

  • Tracker changed from Feature to Bug
  • Subject changed from Redmine 2.0 support to ActionView::Template::Error (undefined method `new_record?' for nil:NilClass)

#29 Updated by Daniel Stonier almost 12 years ago

Selecting 'Git’ with identifier 'testies’ and clicking 'Create new repository’ for r108

Started GET "/projects/testies/repositories/new?utf8=%E2%9C%93&authenticity_token=5CxiGBa9juwe1g78bkM4hsY1s%2B32pP6pGJ35lTDjNAc%3D&repository_scm=Git&repository%5Bis_default%5D=0&repository%5Bis_default%5D=1&repository%5Bidentifier%5D=&repository%5Burl%5D=file%3A%2F%2F%2Fmnt%2Fzaphod%2Fservers%2Fscm%2Fsvn%2Ftesties&commit=Create%20new%20repository&repository%5Blogin%5D=stonier&ignore=akqjqtk&operation=&authenticity_token=5CxiGBa9juwe1g78bkM4hsY1s%2B32pP6pGJ35lTDjNAc%3D" for 10.8.0.6 at Thu Jun 14 22:56:49 +0900 2012
Processing by RepositoriesController#new as JS
  Parameters: {"ignore"=>"adcdaef", "repository"=>{"login"=>"stonier", "url"=>"file:///mnt/zaphod/servers/scm/svn/testies", "is_default"=>"1", "identifier"=>""}, "authenticity_token"=>"5CxiGBa9juwe1g78bkM4hsY1s+32pP6pGJ35lTDjNAc=", "project_id"=>"testies", "operation"=>"", "utf8"=>"✓", "repository_scm"=>"Git", "commit"=>"Create new repository"}
   (0.2ms)  SELECT MAX(`settings`.`updated_on`) AS max_id FROM `settings` 
  User Load (0.2ms)  SELECT `users`.* FROM `users` WHERE `users`.`type` IN ('User', 'AnonymousUser') AND `users`.`id` = ? AND (users.status = 1) LIMIT 1  [["id", 3]]
  Project Load (0.3ms)  SELECT `projects`.* FROM `projects` WHERE `projects`.`identifier` = 'testies' LIMIT 1
  EnabledModule Load (0.2ms)  SELECT name FROM `enabled_modules` WHERE `enabled_modules`.`project_id` = 83
  Repository Load (0.3ms)  SELECT `repositories`.* FROM `repositories` WHERE `repositories`.`project_id` = 83 AND (is_default = 1) LIMIT 1
Shelling out: 'git' --version --no-color
  Rendered plugins/redmine_scm/app/views/repositories/_form.html.erb (18.9ms)
  Rendered repositories/new.html.erb (21.3ms)
Completed 200 OK in 58ms (Views: 34.1ms | ActiveRecord: 1.2ms)

Started POST "/projects/testies/repositories" for 10.8.0.6 at Thu Jun 14 22:56:56 +0900 2012
Processing by RepositoriesController#create as HTML
  Parameters: {"repository"=>{"path_encoding"=>"", "url"=>"/mnt/zaphod/servers/scm/git/testies.git", "is_default"=>"1", "extra_report_last_commit"=>"0", "identifier"=>"testies"}, "authenticity_token"=>"5CxiGBa9juwe1g78bkM4hsY1s+32pP6pGJ35lTDjNAc=", "project_id"=>"testies", "operation"=>"add", "utf8"=>"✓", "repository_scm"=>"Git", "commit"=>"Create new repository"}
   (0.3ms)  SELECT MAX(`settings`.`updated_on`) AS max_id FROM `settings` 
  User Load (0.2ms)  SELECT `users`.* FROM `users` WHERE `users`.`type` IN ('User', 'AnonymousUser') AND `users`.`id` = ? AND (users.status = 1) LIMIT 1  [["id", 3]]
  Project Load (0.3ms)  SELECT `projects`.* FROM `projects` WHERE `projects`.`identifier` = 'testies' LIMIT 1
  EnabledModule Load (0.2ms)  SELECT name FROM `enabled_modules` WHERE `enabled_modules`.`project_id` = 83
 ---
Completed 500 Internal Server Error in 12ms

ActiveRecord::UnknownAttributeError (unknown attribute: extra_report_last_commit):
  activerecord (3.2.5) lib/active_record/attribute_assignment.rb:88:in `assign_attributes'
  activerecord (3.2.5) lib/active_record/attribute_assignment.rb:78:in `each'
  activerecord (3.2.5) lib/active_record/attribute_assignment.rb:78:in `assign_attributes'
  activerecord (3.2.5) lib/active_record/base.rb:498:in `initialize'
  plugins/redmine_scm/lib/scm_repositories_controller_patch.rb:73:in `new'
  plugins/redmine_scm/lib/scm_repositories_controller_patch.rb:73:in `create'
  actionpack (3.2.5) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (3.2.5) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (3.2.5) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.5) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.5) lib/abstract_controller/callbacks.rb:18:in `process_action'
  activesupport (3.2.5) lib/active_support/callbacks.rb:469:in `_run__1181805769__process_action__565251277__callbacks'
  activesupport (3.2.5) lib/active_support/callbacks.rb:405:in `send'
  activesupport (3.2.5) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.5) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  activesupport (3.2.5) lib/active_support/callbacks.rb:81:in `send'
  activesupport (3.2.5) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.5) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (3.2.5) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (3.2.5) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  activesupport (3.2.5) lib/active_support/notifications.rb:123:in `instrument'
  activesupport (3.2.5) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.5) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.5) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  actionpack (3.2.5) lib/action_controller/metal/params_wrapper.rb:206:in `process_action'
  activerecord (3.2.5) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (3.2.5) lib/abstract_controller/base.rb:121:in `process'
  actionpack (3.2.5) lib/abstract_controller/rendering.rb:45:in `process'
  actionpack (3.2.5) lib/action_controller/metal.rb:203:in `dispatch'
  actionpack (3.2.5) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  actionpack (3.2.5) lib/action_controller/metal.rb:246:in `action'
  actionpack (3.2.5) lib/action_dispatch/routing/route_set.rb:73:in `call'
  actionpack (3.2.5) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
  actionpack (3.2.5) lib/action_dispatch/routing/route_set.rb:36:in `call'
  journey (1.0.3) lib/journey/router.rb:68:in `call'
  journey (1.0.3) lib/journey/router.rb:56:in `each'
  journey (1.0.3) lib/journey/router.rb:56:in `call'
  actionpack (3.2.5) lib/action_dispatch/routing/route_set.rb:600:in `call'
  rack-openid (1.3.1) lib/rack/openid.rb:98:in `call'
  actionpack (3.2.5) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.1) lib/rack/etag.rb:23:in `call'
  rack (1.4.1) lib/rack/conditionalget.rb:35:in `call'
  actionpack (3.2.5) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.2.5) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  actionpack (3.2.5) lib/action_dispatch/middleware/flash.rb:238:in `call'
  rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
  rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
  actionpack (3.2.5) lib/action_dispatch/middleware/cookies.rb:338:in `call'
  activerecord (3.2.5) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'
  actionpack (3.2.5) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
  activesupport (3.2.5) lib/active_support/callbacks.rb:405:in `_run__706479634__call__4__callbacks'
  activesupport (3.2.5) lib/active_support/callbacks.rb:405:in `send'
  activesupport (3.2.5) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.5) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.5) lib/active_support/callbacks.rb:81:in `send'
  activesupport (3.2.5) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.5) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.5) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  actionpack (3.2.5) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.5) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.5) lib/rails/rack/logger.rb:26:in `call_app'
  railties (3.2.5) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.5) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.1) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.5) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.1) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.5) lib/action_dispatch/middleware/static.rb:62:in `call'
  rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
  rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass'
  rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate'
  rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!'
  rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
  railties (3.2.5) lib/rails/engine.rb:479:in `call'
  railties (3.2.5) lib/rails/application.rb:220:in `call'
  railties (3.2.5) lib/rails/railtie/configurable.rb:30:in `send'
  railties (3.2.5) lib/rails/railtie/configurable.rb:30:in `method_missing'
  passenger (3.0.12) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  passenger (3.0.12) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
  passenger (3.0.12) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
  passenger (3.0.12) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
  passenger (3.0.12) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
  passenger (3.0.12) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
  passenger (3.0.12) lib/phusion_passenger/utils.rb:479:in `safe_fork'
  passenger (3.0.12) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
  passenger (3.0.12) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
  passenger (3.0.12) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.12) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  passenger (3.0.12) lib/phusion_passenger/abstract_server.rb:180:in `start'
  passenger (3.0.12) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
  passenger (3.0.12) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
  passenger (3.0.12) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
  passenger (3.0.12) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
  passenger (3.0.12) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
  passenger (3.0.12) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (3.0.12) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
  passenger (3.0.12) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
  passenger (3.0.12) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
  passenger (3.0.12) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
  passenger (3.0.12) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.12) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  passenger (3.0.12) helper-scripts/passenger-spawn-server:99

#30 Updated by Andriy Lesyuk almost 12 years ago

Thank you very much, Daniel! I believe this information really helped!

Please try r109!

#31 Updated by Lluís - almost 12 years ago

This is what I get with r109 when I click the “Create new repository” button:

Processing RepositoriesController#create (for ... at ...) [POST]
  Parameters: {"project_id"=>"test", "action"=>"create", "repository"=>{"identifier"=>"foo", "is_default"=>"0", "checkout_display_command"=>"1", "checkout_description"=>"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"=>"0", "extra_report_last_commit"=>"0", "path_encoding"=>"", "url"=>"/home/code/git/test.1", "checkout_protocols"=>{"-1"=>{"protocol"=>"empty"}, "0"=>{"protocol"=>"Git", "command"=>"git clone", "is_default"=>"1", "access"=>"permission", "fixed_url"=>""}}}, "commit"=>"Create new repository", "controller"=>"repositories", "repository_scm"=>"Git", "authenticity_token"=>"...", "operation"=>"add"}

NoMethodError (undefined method `merge_extra_info' for nil:NilClass):
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:1333:in `send'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:1333:in `perform_action_without_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:617:in `call_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:610:in `perform_action_without_benchmark'
  /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
  /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
  /usr/lib/ruby/vendor_ruby/action_controller/rescue.rb:160:in `perform_action_without_flash'
  /usr/lib/ruby/vendor_ruby/action_controller/flash.rb:151:in `perform_action'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:532:in `send'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:532:in `process_without_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:606:in `process'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:391:in `process'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:386:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/routing/route_set.rb:438:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:87:in `dispatch'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:121:in `_call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:130:in `build_middleware_stack'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:9:in `cache'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:28:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/string_coercion.rb:25:in `call'
  /usr/lib/ruby/vendor_ruby/rack/head.rb:9:in `call'
  /usr/lib/ruby/vendor_ruby/rack/methodoverride.rb:21:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/params_parser.rb:15:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/session/cookie_store.rb:99:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/failsafe.rb:26:in `call'
  /usr/lib/ruby/vendor_ruby/rack/lock.rb:15:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:106:in `call'
  /usr/lib/ruby/vendor_ruby/rack/handler/fastcgi.rb:66:in `serve'
  public/dispatch.fcgi:24

Rendering /usr/share/redmine/public/500.html (500 Internal Server Error)
And the plugins I have:
  • Project Settings Hook: 0.0.1
  • Redmine Checkout plugin: 0.5
  • Redmine ezSidebar plugin: 0.1.1
  • Mylyn Connector plugin: 2.7.5.stable
  • SCM Creator: 0.4.0

If you still want me to disable any plugin, can I disable a plugin without actually removing its settings from the DB?

#32 Updated by Daniel Stonier almost 12 years ago

Cross your beard...

On r110 I have a git repo created! Will get everything else set up and just check that it’s fully functional and update here.

#33 Updated by Andriy Lesyuk almost 12 years ago

Lluís, please try revision r111 and give me new logs!

Also, after that, try disabling Checkout plugin... You can just rename/move its directory - database settings should be untouched.

#34 Updated by Lluís - almost 12 years ago

Damn! I had to remove the checkout plugin to make it work, but it’s working flawlessly now.

I’m really sorry for all the fuss 0:)

Thanks a lot Andriy!

#35 Updated by Andriy Lesyuk almost 12 years ago

Not a problem, Lluís!

But I still ask you to try with r111 and Checkout plugin! You see - it’s still possible to make them work together, see: #2043.

#36 Updated by Daniel Stonier almost 12 years ago

Daniel Stonier wrote:

Cross your beard...

On r110 I have a git repo created! Will get everything else set up and just check that it’s fully functional and update here.

Got git smart http setup (using trunk version of Redmine.pm) and everything seems to be fine on revision 111.

#37 Updated by Andriy Lesyuk almost 12 years ago

Lluís, please try running with Checkout plugin again. I would like to know what is the reason of conflict...

#38 Updated by Andriy Lesyuk almost 12 years ago

  • Status changed from Reopened to Closed

Please create new issue when you have (if you have) debug logs for Checkout plugin... Debugs were removed from code though (either do not update yet or ask me to prepare debugs for you again)!

Thanks!

#39 Updated by Lluís - about 11 years ago

For the record, I created #2135 to continue the discussion, and a patch that solves it is available there.

Also available in: Atom PDF

Terms of use | Privacy policy