There are a number of really good beginner''s guides to Rails on the web now - covering installation through to running the first ''scaffold''. However, as a complete Ruby newbie, I found the next stage - moving on to producing ''real'' applications - quite hard going. To help others make the same journey, I''ve put together a ''next steps'' tutorial. I mentioned this on the list last week, and I''ve had some really brilliant feedback off-list as a result. I''d now like to think that ''Four Days on Rails'' is ready for general release (v1.4). It''s available from http://rails.homelinux.org, along with the code for the application described in the document. I''d like to thank the Rails developers for a really cool framework, and I hope ''Four Days on Rails'' will encourage more developers to adopt it. Any feedback gratefully received. John
John McCreesh wrote:> > There are a number of really good beginner''s guides to Rails on the web > now - covering installation through to running the first ''scaffold''. > However, as a complete Ruby newbie, I found the next stage - moving on > to producing ''real'' applications - quite hard going. > > To help others make the same journey, I''ve put together a ''next steps'' > tutorial. I mentioned this on the list last week, and I''ve had some > really brilliant feedback off-list as a result. > > I''d now like to think that ''Four Days on Rails'' is ready for general > release (v1.4). It''s available from http://rails.homelinux.org, along > with the code for the application described in the document. > > I''d like to thank the Rails developers for a really cool framework, and > I hope ''Four Days on Rails'' will encourage more developers to adopt it. > > Any feedback gratefully received.This is excellent John! Part 2 of my ONLamp.com tutorial is scheduled to be published this week. I''ve already submitted it to the editors, but I''m going to see if I can get the resource link amended to link to "Four Days on Rails". Curt
Curt Hibbs wrote:> John McCreesh wrote: > >>There are a number of really good beginner''s guides to Rails on the web >>now - covering installation through to running the first ''scaffold''. >>However, as a complete Ruby newbie, I found the next stage - moving on >>to producing ''real'' applications - quite hard going. >> >>To help others make the same journey, I''ve put together a ''next steps'' >>tutorial. I mentioned this on the list last week, and I''ve had some >>really brilliant feedback off-list as a result. >> >>I''d now like to think that ''Four Days on Rails'' is ready for general >>release (v1.4). It''s available from http://rails.homelinux.org, along >>with the code for the application described in the document. >> >>I''d like to thank the Rails developers for a really cool framework, and >>I hope ''Four Days on Rails'' will encourage more developers to adopt it. >> >>Any feedback gratefully received. > > > This is excellent John! > > Part 2 of my ONLamp.com tutorial is scheduled to be published this week. > I''ve already submitted it to the editors, but I''m going to see if I can get > the resource link amended to link to "Four Days on Rails".Thanks for your kind words - it''s a small world - it was your article on OnLAMP that first got me interested in Rails :-) John
John McCreesh wrote:> > Curt Hibbs wrote: > > John McCreesh wrote: > > > >>There are a number of really good beginner''s guides to Rails on the web > >>now - covering installation through to running the first ''scaffold''. > >>However, as a complete Ruby newbie, I found the next stage - moving on > >>to producing ''real'' applications - quite hard going. > >> > >>To help others make the same journey, I''ve put together a ''next steps'' > >>tutorial. I mentioned this on the list last week, and I''ve had some > >>really brilliant feedback off-list as a result. > >> > >>I''d now like to think that ''Four Days on Rails'' is ready for general > >>release (v1.4). It''s available from http://rails.homelinux.org, along > >>with the code for the application described in the document. > >> > >>I''d like to thank the Rails developers for a really cool framework, and > >>I hope ''Four Days on Rails'' will encourage more developers to adopt it. > >> > >>Any feedback gratefully received. > > > > > > This is excellent John! > > > > Part 2 of my ONLamp.com tutorial is scheduled to be published this week. > > I''ve already submitted it to the editors, but I''m going to see > if I can get > > the resource link amended to link to "Four Days on Rails". > > Thanks for your kind words - it''s a small world - it was your article on > OnLAMP that first got me interested in Rails :-)We''ve got a feedback loop here! :-) Curt
This is a really nice tutorial John! I almost fell out of my chair when I saw that you know odd pages are where the TOC, chapters, etc. are supposed to start! Looking forward to days 5 - n ! Thanks, JJ On 27-Feb-2005, at 10:01, John McCreesh wrote:> There are a number of really good beginner''s guides to Rails on the > web now - covering installation through to running the first > ''scaffold''. However, as a complete Ruby newbie, I found the next stage > - moving on to producing ''real'' applications - quite hard going. > > To help others make the same journey, I''ve put together a ''next steps'' > tutorial. I mentioned this on the list last week, and I''ve had some > really brilliant feedback off-list as a result. > > I''d now like to think that ''Four Days on Rails'' is ready for general > release (v1.4). It''s available from http://rails.homelinux.org, along > with the code for the application described in the document. > > I''d like to thank the Rails developers for a really cool framework, > and I hope ''Four Days on Rails'' will encourage more developers to > adopt it. > > Any feedback gratefully received. > > John > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Hi John, Thanks for writing this tutorial - it looks exactly what I need. However, I''m having problems setting it up, and wonder whether I''m missing something obvious. Page 9 - adding the model and scaffold lines to the categories_controller. Hold on, shouldn''t that be category_controller? At least, that''s what''s created when I run "ruby script/generate controller category" Anyway, when I add the scaffold and test it in a browser, I get this error: ActiveRecord::StatementInvalid in Category#index Invalid argument: SELECT * FROM categories When I run that select in mysql it runs fine, although there''s not yet any content in there, so it returns an empty set. Surely this shouldn''t be an invalid statement. Any ideas? Thanks in advance. James
James Knight wrote:> Hi John, > > Thanks for writing this tutorial - it looks exactly what I need. > > However, I''m having problems setting it up, and wonder whether I''m > missing something obvious. > > Page 9 - adding the model and scaffold lines to the > categories_controller. Hold on, shouldn''t that be category_controller? > At least, that''s what''s created when I run "ruby script/generate > controller category"Thanks - there were a number of errors in the early editions, which thanks to great feedback have been corrected in the latest version.> Anyway, when I add the scaffold and test it in a browser, I get this error: > ActiveRecord::StatementInvalid in Category#index > > Invalid argument: SELECT * FROM categories > > When I run that select in mysql it runs fine, although there''s not yet > any content in there, so it returns an empty set. > > Surely this shouldn''t be an invalid statement.No, it should work ok. Pull yourself down a new copy of the .pdf from http://rails.homelinux.org. You can now also download the sample application too. I''ve moved these two files to another hoster as the number of downloads was swamping my server here, so apologies to anyone inconvenienced by slow downloads. John
Thanks again John, It''s an excellent tutorial - now I need to go and read up more on mysql, as I clearly had a privileges problem earlier ;-) Did someone mention a Day 5 onwards tutorial ...? John McCreesh wrote:> James Knight wrote: > >> Hi John, >> >> Thanks for writing this tutorial - it looks exactly what I need. >> >> However, I''m having problems setting it up, and wonder whether I''m >> missing something obvious. >> >> Page 9 - adding the model and scaffold lines to the >> categories_controller. Hold on, shouldn''t that be category_controller? >> At least, that''s what''s created when I run "ruby script/generate >> controller category" > > > Thanks - there were a number of errors in the early editions, which > thanks to great feedback have been corrected in the latest version. > >> Anyway, when I add the scaffold and test it in a browser, I get this >> error: >> ActiveRecord::StatementInvalid in Category#index >> >> Invalid argument: SELECT * FROM categories >> >> When I run that select in mysql it runs fine, although there''s not yet >> any content in there, so it returns an empty set. >> >> Surely this shouldn''t be an invalid statement. > > > No, it should work ok. Pull yourself down a new copy of the .pdf from > http://rails.homelinux.org. You can now also download the sample > application too. I''ve moved these two files to another hoster as the > number of downloads was swamping my server here, so apologies to anyone > inconvenienced by slow downloads. > > John > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
James, a friend of mine experienced the same issue, he believes it''s the outdated ruby mysql driver, it doesn''t support the new authentication introduced in 4.1.1, did you setup the mysql server the way the onlamp article says to?> >> Anyway, when I add the scaffold and test it in a browser, I get this > >> error: > >> ActiveRecord::StatementInvalid in Category#index > >> > >> Invalid argument: SELECT * FROM categories > >> > >> When I run that select in mysql it runs fine, although there''s not yet > >> any content in there, so it returns an empty set. > >> > >> Surely this shouldn''t be an invalid statement.
No, I don''t think I did. Once I granted privileges to the user in John''s tutorial it worked, whereas when I tried to follow the tutorial accessing the database via my usual mysql user, it failed. Cory Knox wrote:> James, a friend of mine experienced the same issue, he believes it''s > the outdated ruby mysql driver, it doesn''t support the new > authentication introduced in 4.1.1, did you setup the mysql server the > way the onlamp article says to? > > > >>>>Anyway, when I add the scaffold and test it in a browser, I get this >>>>error: >>>> ActiveRecord::StatementInvalid in Category#index >>>> >>>>Invalid argument: SELECT * FROM categories >>>> >>>>When I run that select in mysql it runs fine, although there''s not yet >>>>any content in there, so it returns an empty set. >>>> >>>>Surely this shouldn''t be an invalid statement. > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
I only have one-sided printing, so I deleted all the blank pages using Acrobat. If anyone wants this modified [I suspect John might say "butchered" :-)] version, let me know. Reid P.S. First time sending mail with Thunderbird -0 apologies if it is poorly formatted or something. Those quotes look suspiciously smart. John Johnson wrote:> This is a really nice tutorial John! > > I almost fell out of my chair when I saw that you know odd pages are > where the TOC, chapters, etc. are supposed to start! > > Looking forward to days 5 - n ! > > Thanks, > JJ > > On 27-Feb-2005, at 10:01, John McCreesh wrote: > >> There are a number of really good beginner''s guides to Rails on the >> web now - covering installation through to running the first >> ''scaffold''. However, as a complete Ruby newbie, I found the next >> stage - moving on to producing ''real'' applications - quite hard going. >> >> To help others make the same journey, I''ve put together a ''next >> steps'' tutorial. I mentioned this on the list last week, and I''ve had >> some really brilliant feedback off-list as a result. >> >> I''d now like to think that ''Four Days on Rails'' is ready for general >> release (v1.4). It''s available from http://rails.homelinux.org, along >> with the code for the application described in the document. >> >> I''d like to thank the Rails developers for a really cool framework, >> and I hope ''Four Days on Rails'' will encourage more developers to >> adopt it. >> >> Any feedback gratefully received. >> >> John >
On Fri, 04 Mar 2005 14:53:13 -0500, Reid Ellis <rae-TiXfJ8ZWoNs@public.gmane.org> wrote:> P.S. First time sending mail with Thunderbird -0 apologies if it is > poorly formatted or something.You mean aside from the TOFU? ;) -- One Guy With A Camera http://rbpark.ath.cx
Point taken :-) I had always intended to do a single-sided version once the document had stabilised, but while I was doing several revisions a day it was too much like hard work. If it rains this weekend... I''ve had a number of requests for extra stuff, e.g. editing multiple records on the same page. If I get round to doing these, I think they''ll end up in ''Four More Days on Rails'' or suchlike, to keep the size of the original document manageable. I''d really like to put the whole thing on-line too. The export to pdf from OpenOffice.org 2.0 is brilliant; the export to html pretty good - now that the latest 2.0 beta is out it may be good enough. John Reid Ellis wrote:> I only have one-sided printing, so I deleted all the blank pages using > Acrobat. If anyone wants this modified [I suspect John might say > "butchered" :-)] version, let me know. > > Reid > > P.S. First time sending mail with Thunderbird -0 apologies if it is > poorly formatted or something. Those quotes look suspiciously smart. > > John Johnson wrote: > >> This is a really nice tutorial John! >> >> I almost fell out of my chair when I saw that you know odd pages are >> where the TOC, chapters, etc. are supposed to start! >> >> Looking forward to days 5 - n ! >> >> Thanks, >> JJ >> >> On 27-Feb-2005, at 10:01, John McCreesh wrote: >> >>> There are a number of really good beginner''s guides to Rails on the >>> web now - covering installation through to running the first >>> ''scaffold''. However, as a complete Ruby newbie, I found the next >>> stage - moving on to producing ''real'' applications - quite hard going. >>> >>> To help others make the same journey, I''ve put together a ''next >>> steps'' tutorial. I mentioned this on the list last week, and I''ve had >>> some really brilliant feedback off-list as a result. >>> >>> I''d now like to think that ''Four Days on Rails'' is ready for general >>> release (v1.4). It''s available from http://rails.homelinux.org, along >>> with the code for the application described in the document. >>> >>> I''d like to thank the Rails developers for a really cool framework, >>> and I hope ''Four Days on Rails'' will encourage more developers to >>> adopt it. >>> >>> Any feedback gratefully received. >>> >>> John >> >> > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >