# Newby stuck on tutorial PGError: ERROR: column

**URL:** <https://www.ruby-forum.com/t/newby-stuck-on-tutorial-pgerror-error-column/177980>\
**Category:** Rails\
**Created:** [October 27, 2009, 2:17pm UTC](https://www.ruby-forum.com/t/newby-stuck-on-tutorial-pgerror-error-column/177980 "2009-10-27T14:17:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e36b37/32.png) [@mith](https://www.ruby-forum.com/u/mith)\
**Post date:** [October 27, 2009, 2:17pm UTC](https://www.ruby-forum.com/t/newby-stuck-on-tutorial-pgerror-error-column/177980/1 "2009-10-27T14:17:58Z")

</div>

# 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

---

<div class="post-metadata">

**Author:** ![mith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e36b37/32.png) [@mith](https://www.ruby-forum.com/u/mith)\
**Post date:** [October 27, 2009, 3:10pm UTC](https://www.ruby-forum.com/t/newby-stuck-on-tutorial-pgerror-error-column/177980/2 "2009-10-27T15:10:59Z")

</div>

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](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![mith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e36b37/32.png) [@mith](https://www.ruby-forum.com/u/mith)\
**Post date:** [October 27, 2009, 3:22pm UTC](https://www.ruby-forum.com/t/newby-stuck-on-tutorial-pgerror-error-column/177980/3 "2009-10-27T15:22:41Z")

</div>

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.
