Newby stuck on tutorial PGError: ERROR: column

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

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 appreciated

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.

Peter

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs