Sasha Chilly
2013-May-26 12:49 UTC
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? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/40514bb7-bb1a-4b40-9a32-590ba89e36bd%40googlegroups.com?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.
cooker.kang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2013-May-27 06:04 UTC
Re: ArgumentError in Controller#new after updating Rails version
I think you should check your routes.rb file. kang On Sunday, May 26, 2013 8:49:27 PM UTC+8, Sasha Chilly 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 > > 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? >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/007bb3a9-9abf-47dc-a48a-43380ad66ca5%40googlegroups.com?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.
Colin Law
2013-May-27 08:52 UTC
Re: ArgumentError in Controller#new after updating Rails version
On 26 May 2013 13:49, Sasha Chilly <sashachilly.z-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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/1o0P050d2q41You should get a more detailed trace in the server console or in development.log Colin> > 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? > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/40514bb7-bb1a-4b40-9a32-590ba89e36bd%40googlegroups.com?hl=en-US. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtvbCGO1JnNaykcY4ykiiz02LCo%2Btz5q8kN--uMZG9KHw%40mail.gmail.com?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.
Sasha Chilly
2013-May-27 10:05 UTC
Re: ArgumentError in Controller#new after updating Rails version
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 Law написал:> > On 26 May 2013 13:49, Sasha Chilly <sashac...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> > 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 > > > > > 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? > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Ruby on Rails: Talk" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to rubyonrails-ta...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. > > To post to this group, send email to rubyonra...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<javascript:>. > > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/rubyonrails-talk/40514bb7-bb1a-4b40-9a32-590ba89e36bd%40googlegroups.com?hl=en-US. > > > For more options, visit https://groups.google.com/groups/opt_out. > > > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0c0b2276-c7c7-495e-a8ef-992ac2562bbc%40googlegroups.com?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.
andreo-FdlSlcb4kYpknbxzx/v8hQ@public.gmane.org
2013-May-31 08:55 UTC
Re: ArgumentError in Controller#new after updating Rails version
On Sunday, 26 May 2013 14:49:27 UTC+2, Sasha Chilly 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 > > 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? >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ac338165-bdc5-4fd4-9b92-f9b581cc045a%40googlegroups.com?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.
andreo-FdlSlcb4kYpknbxzx/v8hQ@public.gmane.org
2013-May-31 08:57 UTC
Re: ArgumentError in Controller#new after updating Rails version
On Monday, 27 May 2013 12:05:08 UTC+2, Sasha Chilly 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?> > 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 Law написал: >> >> On 26 May 2013 13:49, Sasha Chilly <sashac...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 >> >> > >> > 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? >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups >> > "Ruby on Rails: Talk" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> an >> > email to rubyonrails-ta...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > To post to this group, send email to rubyonra...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > To view this discussion on the web visit >> > >> https://groups.google.com/d/msgid/rubyonrails-talk/40514bb7-bb1a-4b40-9a32-590ba89e36bd%40googlegroups.com?hl=en-US. >> >> > For more options, visit https://groups.google.com/groups/opt_out. >> > >> > >> >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/13cecdaf-9d8e-485b-9854-9cf212a56ac9%40googlegroups.com?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.
Sasha Chilly
2013-May-31 10:54 UTC
Re: ArgumentError in Controller#new after updating Rails version
Here it is: <% set_editor_comment %> <%= form_for @article do |f| %> <%= render "shared/error_messages", :target => @article %> <% if admin? %> <p> <%= f.label :user_id %> <%= f.select :user_id, User.authors_and_admins.collect {|p| [ p.username, p.id ] } %> </p> <% end %> <p> <%= f.label :category_id %><%= mark_required(@article, :category_id) %><br/> <%= f.select :category_id, Category.all.collect {|p| [ p.name, p.id ] }, { :include_blank => true } %> </p> <p> <%= f.label :name %><%= mark_required(@article, :name) %><br/> <%= f.text_field :name %> </p> <p> <%= f.label :preview %><%= mark_required(@article, :preview) %><br/> <%= f.text_area :preview, :size => "70x6" %> </p> <p> <%= f.label :body %><%= mark_required(@article, :body) %><br/> <%= f.text_area :body, :class => "mceEditor", :size => "100x20" %> </p> <% if admin? %> <p> <%= f.label :publish_on_main %> <%= f.check_box :publish_on_main %> </p> <% end %> <%= f.submit %> <% end %> <div style="margin-top: 10px;"> <iframe src="<%= images_path %>" width="90%" height="500" name="imagesIframe"></iframe> </div> -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b602ba76-cc2a-4d68-9bf9-a6912083058d%40googlegroups.com?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.
andreo-FdlSlcb4kYpknbxzx/v8hQ@public.gmane.org
2013-May-31 11:58 UTC
Re: ArgumentError in Controller#new after updating Rails version
And the server console does not give you any information? when you hit the route what does the browser show? On Friday, May 31, 2013 12:54:48 PM UTC+2, Sasha Chilly wrote:> > Here it is: > > <% set_editor_comment %> > <%= form_for @article do |f| %> > <%= render "shared/error_messages", :target => @article %> > <% if admin? %> > <p> > <%= f.label :user_id %> > <%= f.select :user_id, User.authors_and_admins.collect {|p| [ > p.username, p.id ] } %> > </p> > <% end %> > <p> > <%= f.label :category_id %><%= mark_required(@article, :category_id) > %><br/> > <%= f.select :category_id, Category.all.collect {|p| [ p.name, p.id] }, { :include_blank => true } %> > </p> > <p> > <%= f.label :name %><%= mark_required(@article, :name) %><br/> > <%= f.text_field :name %> > </p> > <p> > <%= f.label :preview %><%= mark_required(@article, :preview) %><br/> > <%= f.text_area :preview, :size => "70x6" %> > </p> > <p> > <%= f.label :body %><%= mark_required(@article, :body) %><br/> > <%= f.text_area :body, :class => "mceEditor", :size => "100x20" %> > </p> > <% if admin? %> > <p> > <%= f.label :publish_on_main %> > <%= f.check_box :publish_on_main %> > </p> > <% end %> > <%= f.submit %> > <% end %> > > <div style="margin-top: 10px;"> > <iframe src="<%= images_path %>" width="90%" height="500" > name="imagesIframe"></iframe> > </div> >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/03c13cba-f2c2-4d50-8e1d-2f162214891d%40googlegroups.com?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.
Sasha Chilly
2013-May-31 12:06 UTC
Re: ArgumentError in Controller#new after updating Rails version
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 пользователь and...-FdlSlcb4kYpknbxzx/v8hQ@public.gmane.org написал:> > And the server console does not give you any information? > > when you hit the route what does the browser show? > > On Friday, May 31, 2013 12:54:48 PM UTC+2, Sasha Chilly wrote: >> >> Here it is: >> >> <% set_editor_comment %> >> <%= form_for @article do |f| %> >> <%= render "shared/error_messages", :target => @article %> >> <% if admin? %> >> <p> >> <%= f.label :user_id %> >> <%= f.select :user_id, User.authors_and_admins.collect {|p| [ >> p.username, p.id ] } %> >> </p> >> <% end %> >> <p> >> <%= f.label :category_id %><%= mark_required(@article, :category_id) >> %><br/> >> <%= f.select :category_id, Category.all.collect {|p| [ p.name, p.id] }, { :include_blank => true } %> >> </p> >> <p> >> <%= f.label :name %><%= mark_required(@article, :name) %><br/> >> <%= f.text_field :name %> >> </p> >> <p> >> <%= f.label :preview %><%= mark_required(@article, :preview) %><br/> >> <%= f.text_area :preview, :size => "70x6" %> >> </p> >> <p> >> <%= f.label :body %><%= mark_required(@article, :body) %><br/> >> <%= f.text_area :body, :class => "mceEditor", :size => "100x20" %> >> </p> >> <% if admin? %> >> <p> >> <%= f.label :publish_on_main %> >> <%= f.check_box :publish_on_main %> >> </p> >> <% end %> >> <%= f.submit %> >> <% end %> >> >> <div style="margin-top: 10px;"> >> <iframe src="<%= images_path %>" width="90%" height="500" >> name="imagesIframe"></iframe> >> </div> >> >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/834c2df8-d30a-4103-89c9-9d73c51fa5ae%40googlegroups.com?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.
andreo-FdlSlcb4kYpknbxzx/v8hQ@public.gmane.org
2013-May-31 12:27 UTC
Re: ArgumentError in Controller#new after updating Rails version
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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ba38458a-8032-4be2-ad02-7ad36c5a3679%40googlegroups.com?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.