Hi I''m new to Rails. i am using aptana Radrails and rad rails standalone version for my development. Followed some tutorials on the web on how to create a simple project. When I fire up the browser the fields and labels are not being displayed. I also tried IE external to RadRails, and FireFox. Same thing. I see ''show edit destroy'', and ''new'', and that''s it. I can click on ''new'', then click on ''create'', and a record does get added to the MySQL db (all spaces). I added a default value to one of the fields and that isn''t displayed either. I''ve deleted the project and did it again, same result. Deleted that one and followed the example from the Ruby on Rails for Dummies book...same result. Any suggestions on what could be causing this? pls see the attachemnt too thank you Attachments: http://www.ruby-forum.com/attachment/3770/rails.jpg -- Posted via http://www.ruby-forum.com/.
Umm... you have no fields defined in your views? What is in index.html.erb, or show.html.erb, or new and edit erb files? Or perhaps your model has only id and nothing else? Hard to tell without some source to look at. -- Posted via http://www.ruby-forum.com/.
Hi Ar Chron first of all thank you very much for your reply. i followed many examples all seems to be pretty much same. here is one http://tv.aptana.com/videos/introduction-to-radrails?ref=learn&refId=6 index.html.erb <h1>Listing employees</h1> <table> <tr> </tr> <% @employees.each do |employee| %> <tr> <td><%= link_to ''Show'', employee %></td> <td><%= link_to ''Edit'', edit_employee_path(employee) %></td> <td><%= link_to ''Destroy'', employee, :confirm => ''Are you sure?'', :method => :delete %></td> </tr> <% end %> </table> <br /> <%= link_to ''New employee'', new_employee_path %> new.html.erb <h1>New employee</h1> <% form_for(@employee) do |f| %> <%= f.error_messages %> <p> <%= f.submit ''Create'' %> </p> <% end %> <%= link_to ''Back'', employees_path %> show.html.erb <%= link_to ''Edit'', edit_employee_path(@employee) %> | <%= link_to ''Back'', employees_path %> edit.html.erb <h1>Editing employee</h1> <% form_for(@employee) do |f| %> <%= f.error_messages %> <p> <%= f.submit ''Update'' %> </p> <% end %> <%= link_to ''Show'', @employee %> | <%= link_to ''Back'', employees_path %> i have also attached the project for your reference. i am new to RoR so i really appreciate you help to get stuff started. Thank you Again Attachments: http://www.ruby-forum.com/attachment/3777/test.zip -- Posted via http://www.ruby-forum.com/.
None of your views have any fields - just links for Create, Edit, Back, New, etc. It looks like you might have generated scaffolding without specifying any field attributes. On Jun 3, 8:25 am, Asanka Mawilmada <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi Ar Chron > > first of all thank you very much for your reply. > > i followed many examples all seems to be pretty much same. here is onehttp://tv.aptana.com/videos/introduction-to-radrails?ref=learn&refId=6 > > index.html.erb > <h1>Listing employees</h1> > <table> > <tr> > </tr> > <% @employees.each do |employee| %> > <tr> > <td><%= link_to ''Show'', employee %></td> > <td><%= link_to ''Edit'', edit_employee_path(employee) %></td> > <td><%= link_to ''Destroy'', employee, :confirm => ''Are you sure?'', > :method => :delete %></td> > </tr> > <% end %> > </table> > <br /> > <%= link_to ''New employee'', new_employee_path %> > > new.html.erb > <h1>New employee</h1> > <% form_for(@employee) do |f| %> > <%= f.error_messages %> > <p> > <%= f.submit ''Create'' %> > </p> > <% end %> > <%= link_to ''Back'', employees_path %> > > show.html.erb > <%= link_to ''Edit'', edit_employee_path(@employee) %> | > <%= link_to ''Back'', employees_path %> > > edit.html.erb > <h1>Editing employee</h1> > > <% form_for(@employee) do |f| %> > <%= f.error_messages %> > > <p> > <%= f.submit ''Update'' %> > </p> > <% end %> > > <%= link_to ''Show'', @employee %> | > <%= link_to ''Back'', employees_path %> > > i have also attached the project for your reference. > > i am new to RoR so i really appreciate you help to get stuff started. > > Thank you Again > > Attachments:http://www.ruby-forum.com/attachment/3777/test.zip > > -- > Posted viahttp://www.ruby-forum.com/.
hi Litwin i am not quit sure how to build a app from A-Z as i am new to RoR, i am currently following Rails for dummies book. i did exactly according to the book but not sure why its not working . can y any of you pls post me a video or tutorial URL with correct steps to get me started pls pls pls. thank you A -- Posted via http://www.ruby-forum.com/.
may be i am using incorrect tool for my development. if so can any one point me to the correct tools thank you A -- Posted via http://www.ruby-forum.com/.
http://www.tutorialspoint.com/ruby-on-rails/ This is good for beginners (Rails 2.1) There are so many others available on net Also try to get books 1.Agile web development with Rails 2.Beginning RubyOnRails (wrox publications) Sijo -- Posted via http://www.ruby-forum.com/.
Hi Asanka, I have same issue. Did you find what was wrong with that example? If yes please let me know how to fix it. Thank you, Vlad -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
It looks like the form_for helper needs to be using a print ERB expression tag instead of ERB code tag: <%*=* form_for(@employee) do |f| %> instead of <% form_for(@employee) do |f| %> -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jan 4, 8:29 pm, Vlad Vlad <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi Asanka, > > I have same issue. Did you find what was wrong with that example? > If yes please let me know how to fix it. >I''d guess that the tutorial being followed assumes the presence of dynamic scaffolding, which hasn''t been the case for a long time (was removed in rails 2 I think) Fred> Thank you, > Vlad > > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.