ArgumentError in Controller#new after updating Rails version

Hello, need some help,
App is running under Ruby 1.8.7 and Rails 3.0.11
After updating Rails version to 3.1.11, tsrted to fet strange error on
new
article page:

http://cl.ly/image/1o0P050d2q41

Don’t know where this error could come from, as in controller i have
only:

class ArticlesController < ApplicationController

def new
@article = Article.new
end

and in view is only form_for @article.

However edit action works fine, as before Rails update.

Any ideas how to fix it?

I think you should check your routes.rb file.
kang

On 26 May 2013 13:49, Sasha C. [email protected] wrote:

Hello, need some help,
App is running under Ruby 1.8.7 and Rails 3.0.11
After updating Rails version to 3.1.11, tsrted to fet strange error on new
article page:

http://cl.ly/image/1o0P050d2q41

You should get a more detailed trace in the server console or in
development.log

Colin

On Monday, 27 May 2013 12:05:08 UTC+2, Sasha C. wrote:

This is what i can see in development.log file:

Started GET “/articles/new” for 127.0.0.1 at Mon May 27 14:00:44 +0400 2013
Processing by ArticlesController#new as HTML
Completed 500 Internal Server Error in 214ms

ArgumentError (wrong number of arguments (1 for 0)):

Sorry if I will reapeat myself but I am sure the first post did what I
wanted:

This error means you are calling a function with 1 argument that
receives 0.

can you show us your complete view?

This is what i can see in development.log file:

Started GET “/articles/new” for 127.0.0.1 at Mon May 27 14:00:44 +0400
2013
Processing by ArticlesController#new as HTML
Completed 500 Internal Server Error in 214ms

ArgumentError (wrong number of arguments (1 for 0)):

Rendered
/Users/iriskin/.rvm/gems/ree-1.8.7-2012.02@mednadom/gems/actionpack-3.1.11/lib/action_dispatch/middleware/templates/rescues/_trace.erb
(1.1ms)
Rendered
/Users/iriskin/.rvm/gems/ree-1.8.7-2012.02@mednadom/gems/actionpack-3.1.11/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb
(0.7ms)
Rendered
/Users/iriskin/.rvm/gems/ree-1.8.7-2012.02@mednadom/gems/actionpack-3.1.11/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb
within rescues/layout (6.1ms)

As for me, unfortunately, not very helpful(

, 27 2013 ., 12:52:04 UTC+4 Colin L. :

Here it is:

<% set_editor_comment %>
<%= form_for @article do |f| %>
<%= render “shared/error_messages”, :target => @article %>
<% if admin? %>


<%= f.label :user_id %>
<%= f.select :user_id, User.authors_and_admins.collect {|p| [
p.username, p.id ] } %>


<% end %>

<%= f.label :category_id %><%= mark_required(@article, :category_id) %>
<%= f.select :category_id, Category.all.collect {|p| [ p.name, p.id ] }, { :include_blank => true } %>

<%= f.label :name %><%= mark_required(@article, :name) %>
<%= f.text_field :name %>

<%= f.label :preview %><%= mark_required(@article, :preview) %>
<%= f.text_area :preview, :size => "70x6" %>

<%= f.label :body %><%= mark_required(@article, :body) %>
<%= f.text_area :body, :class => "mceEditor", :size => "100x20" %>

<% if admin? %>

<%= f.label :publish_on_main %> <%= f.check_box :publish_on_main %>

<% end %> <%= f.submit %> <% end %>

And the server console does not give you any information?

when you hit the route what does the browser show?

What browser shows - i’ve linked in my first post.
What is shown in console - you can see in my second post.
That’s all information that i can see…

, 31 2013 ., 15:58:23 UTC+4 [email protected]
:

Well in your second post you do not show the development.log, what I am
asking is your console where you start your server.

also have you tried and raised your view to see if it gets hit.
like on line 1:

<%= raise “puts”.inspect %>

if it doesnst raise we will know the view does not get hit and we try
the
controller then put the raise on the beginning if doesnt get hit then we
know its on the routes or rails. try that as well