macpro:photos peterr$ rake photos:reset (in /Development/photos) == CreatePhotos: migrating ==================================================-- create_table(:photos) NOTICE: CREATE TABLE will create implicit sequence "photos_id_seq" for serial column "photos.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "photos_pkey" for table "photos" -> 0.0048s == CreatePhotos: migrated (0.0049s) ========================================= == CreateSlides: migrating ==================================================-- create_table(:slides) NOTICE: CREATE TABLE will create implicit sequence "slides_id_seq" for serial column "slides.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "slides_pkey" for table "slides" -> 0.0037s == CreateSlides: migrated (0.0038s) ========================================= rake aborted! PGError: ERROR: column "postion" of relation "slides" does not exist LINE 1: ..., "slideshow_id", "updated_at", "id", "photo_id", "postion")... Fixtures .yml file: <% 1.upto(9) do |i| %> slide_<%=i%>: id: <%=i%> postion: <%=i%> photo_id: <%=i%> slideshow_id: 1 <% end %> Snow Leopard, Rails 2.3.4, psql 8.3 gem 1.3.4 Help would be appreciated Peter -- Posted via http://www.ruby-forum.com/.
Marnen Laibow-Koser
2009-Oct-27 14:10 UTC
Re: newby stuck on tutorial PGError: ERROR: column
Peter Ritchie wrote: [...]> rake aborted! > PGError: ERROR: column "postion" of relation "slides" does not exist > LINE 1: ..., "slideshow_id", "updated_at", "id", "photo_id", > "postion")... > > Fixtures .yml file: > > <% 1.upto(9) do |i| %> > slide_<%=i%>: > id: <%=i%> > postion: <%=i%> > photo_id: <%=i%> > slideshow_id: 1 > <% end %> > > Snow Leopard, Rails 2.3.4, psql 8.3 gem 1.3.4 > > Help would be appreciatedLooks like you have a typo in your fixtures file. Is the column really called "postion", or did you mean "position"? BTW, fixtures are not good for most testing. Try Machinist or something similar instead.> > PeterBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
Marnen Laibow-Koser wrote:> > Looks like you have a typo in your fixtures file. Is the column really > called "postion", or did you mean "position"? > > BTW, fixtures are not good for most testing. Try Machinist or something > similar instead.How embarrassing! Although ''postions'' are not bad really. Thanks for the tip on Machinist. -- Posted via http://www.ruby-forum.com/.