I have create a ruby application at http://wopmod.digitalcarnival.com and have done all the database stuff and have even migrated tables and now I have trioed creating the scaffolds for it but when I go to the main scaffolds page for it, http://wopmod.digitalcarnival.com/people I get an application error(rails) message yet when I go to say http://wopmod.digitalcarnival.com/people/edit.rhtml it works, any ideas as to why it doesnt work? -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Stuart, how did you set up the scaffold? can you post the relevant controller code and the command line script you used to generate the scaffold? i''m thinking that your rails application is getting lost because it doesn''t have a reference to and index (linking to an index.rhtml view) in the People class. good luck. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Stuart, ...people/show and ...people/list are also not being picked up. could you have you over ridden the basic scaffold and only completed one of the views (edit)? --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Stuart, Do you have an index method in your people_controller.rb? If so, does it look something like this? def index list render :action => ''list'' end The above method handles URLs that don''t specify any other method, such as http://wopmod.digitalcarnival.com/people. Shauna -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Shauna wrote:> Hi Stuart, > > Do you have an index method in your people_controller.rb? If so, does it > look something like this? > > def index > list > render :action => ''list'' > end > > The above method handles URLs that don''t specify any other method, such > as http://wopmod.digitalcarnival.com/people. > > ShaunaThis is my index: class PeopleController < ApplicationController def index list render :action => ''list'' end # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) verify :method => :post, :only => [ :destroy, :create, :update ], :redirect_to => { :action => :list } def list @person_pages, @people = paginate :people, :per_page => 10 end def show @person = Person.find(params[:id]) end def new @person = Person.new end def create @person = Person.new(params[:person]) if @person.save flash[:notice] = ''Person was successfully created.'' redirect_to :action => ''list'' else render :action => ''new'' end end def edit @person = Person.find(params[:id]) end def update @person = Person.find(params[:id]) if @person.update_attributes(params[:person]) flash[:notice] = ''Person was successfully updated.'' redirect_to :action => ''show'', :id => @person else render :action => ''edit'' end end def destroy Person.find(params[:id]).destroy redirect_to :action => ''list'' end end Would it matter that I also have another scaffold called news. which is also doing the same thing, and even when I go to http://wopmod.digitalcarnival.com/list.rhtml I get the error. I dont know whats going wrong! -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Skeets wrote:> Stuart, ...people/show and ...people/list are also not being picked up. > could you have you over ridden the basic scaffold and only completed > one of the views (edit)?I dont think so, all I did was ruby script/generate scaffold people I know edit and new work if add the .rhtml extension -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Stuart, what does your list.rhtml file look like int he views directory? verify the name is "list.rhtml". have you tried restarting webrick to see if it just isn''t seeing changes you''ve made? if list,.rhtml exist and is in the views directory, you may want to test out the connection. delete everything in list.rhtml and type in <p>here</p>. try to load the page again and see if "here" is displayed. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ill try all that now, ill post more soon. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I have restarted my webrick server with no luck and here is what is in my list.rhtml file: <h1>Listing people</h1> <table> <tr> <% for column in Person.content_columns %> <th><%= column.human_name %></th> <% end %> </tr> <% for person in @people %> <tr> <% for column in Person.content_columns %> <td><%=h person.send(column.name) %></td> <% end %> <td><%= link_to ''Show'', :action => ''show'', :id => person %></td> <td><%= link_to ''Edit'', :action => ''edit'', :id => person %></td> <td><%= link_to ''Destroy'', { :action => ''destroy'', :id => person }, :confirm => ''Are you sure?'', :post => true %></td> </tr> <% end %> </table> <%= link_to ''Previous page'', { :page => @person_pages.current.previous } if @person_pages.current.previous %> <%= link_to ''Next page'', { :page => @person_pages.current.next } if @person_pages.current.next %> <br /> <%= link_to ''New person'', :action => ''new'' %> Should I post my table structure? -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
OK!!! I think I have found why it wont work, when I migrated the tables only went into development yet my app environment is production! How can I just put my tables in to all the other databases (test and development) Im using mysql and have phpmyadmin! -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Stuart Loxton wrote:> > > > OK!!! I think I have found why it wont work, when I migrated the tables > only went into development yet my app environment is production! How can > I just put my tables in to all the other databases (test and > development) Im using mysql and have phpmyadmin!Ok I have everything working now, Thank You all! -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---