Project

General

Profile

Actions

Defect #6567

closed

can not add user or add a issue

Added by Jeffrey Moncrieff over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
2010-10-04
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Hello, I have just installed redmine on my development server. I like so far but I have run in to a couple of snags

  1. when I try to add a issue I get a Internal server error
    --------------
    Rendering /home/mongrel/redmine/public/500.html (500 Internal Server Error)

Processing IssuesController#create (for 10.2.2.245 at 2010-10-04 07:30:04) [POST]
Parameters: {"commit"=>"Create", "project_id"=>"mwdserp", "action"=>"create", "authenticity_token"=>"o7y/uHQPnt6Q6j7rF4s4j73XhPgS5UWNnETR8p8UQII=", "issue"=>{"start_date"=>"2010-10-04", "estimated_hours"=>"", "priority_id"=>"1", "done_ratio"=>"0", "assigned_to_id"=>"", "subject"=>"testing", "category_id"=>"", "tracker_id"=>"1", "due_date"=>"", "status_id"=>"2", "description"=>""}, "controller"=>"issues", "attachments"=>{"1"=>{"description"=>""}}}

NoMethodError (undefined method `to_sym' for false:FalseClass):
app/models/user.rb:397:in `notify_about?'
app/models/issue.rb:420:in `recipients'
app/models/mailer.rb:46:in `issue_add'
app/models/issue_observer.rb:20:in `after_create'
/usr/lib/ruby/1.8/observer.rb:185:in `notify_observers'
/usr/lib/ruby/1.8/observer.rb:184:in `each'
/usr/lib/ruby/1.8/observer.rb:184:in `notify_observers'
app/controllers/issues_controller.rb:131:in `create'


  1. when i try to create a user I get

Rendering /home/mongrel/redmine/public/500.html (500 Internal Server Error)

Processing UsersController#create (for 10.2.2.245 at 2010-10-04 07:19:55) [POST]
Parameters: {"send_information"=>"1", "password_confirmation"=>"[FILTERED]", "action"=>"create", "authenticity_token"=>"o7y/uHQPnt6Q6j7rF4s4j73XhPgS5UWNnETR8p8UQII=", "no_self_notified"=>"1", "pref"=>{"hide_mail"=>"0", "comments_sorting"=>"asc", "time_zone"=>"Eastern Time (US & Canada)"}, "controller"=>"users", "user"=>{"admin"=>"0", "language"=>"en", "mail"=>"", "lastname"=>"Moncrieff", "firstname"=>"Jeffrey", "login"=>"jeff"}, "password"=>"[FILTERED]", "notification_option"=>"all", "continue"=>"Create and continue"}
Rendering template within layouts/admin
Rendering users/new

ActionView::TemplateError (undefined method `to_sym' for false:FalseClass) on line #2 of app/views/users/_mail_notifications.html.erb:
1: <p>
2: <%= select_tag 'notification_option', options_for_select(@notification_options.collect {|o| [l(o.last), o.first]}, @notification_option.to_sym),
3: :onchange => 'if ($("notification_option").value "selected") {Element.show("notified-projects")} else {Element.hide("notified-projects")}' >
4: &lt;/p&gt;
5: <
content_tag 'div', :id => 'notified-projects', :style => (@notification_option 'selected' ? '' : 'display:none;') do %>

app/views/users/_mail_notifications.html.erb:2
app/views/users/_form.rhtml:38:in `_run_rhtml_app47views47users47_form46rhtml_locals_f_form_object'
app/views/users/new.html.erb:4
app/helpers/application_helper.rb:721:in `labelled_tabular_form_for'
app/views/users/new.html.erb:3
app/controllers/users_controller.rb:110:in `create'

the about script
/home/mongrel/redmine/script# ./about
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
About your application's environment
Ruby version 1.8.7 (i486-linux)
RubyGems version 1.3.7
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Application root /home/mongrel/redmine
Environment development
Database adapter mysql
Database schema version 20100819172912

Actions #1

Updated by Jean-Baptiste Barth over 14 years ago

Can you try to run rake db:migrate (with the correct RAILS_ENV variable set) and tell us if you get the same issue after that ? I got the same error NoMethodError (undefined method `to_sym' for false:FalseClass): with recent trunk versions : 2 migrations have been added but with the wrong date, so they're not easily visible.

Actions #2

Updated by Jeffrey Moncrieff over 14 years ago

  • Status changed from New to Resolved

I did a rake db:migrate and seem to fix the problem, To me it looks like the database schema has changed But I am not a ruby developer I am a Perl/PHP Developer.

Actions #3

Updated by Felix Schäfer over 14 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid

Jeffrey Moncrieff wrote:

I did a rake db:migrate and seem to fix the problem, To me it looks like the database schema has changed But I am not a ruby developer I am a Perl/PHP Developer.

Yes, migrations are the rails-slang for "database schema updates". All schema updates being incremental, you just need to "apply" the latest migrations to your DB to bring it to the last version, and you should do that after each redmine update. Also see RedmineUpgrade for more info.

You might also want to have a look at #6549, there's a little snafu in those migrations which might cause certain notification settings to not be migrated properly.

Actions

Also available in: Atom PDF