# Error when calling "to\_sql" (Rails 3 beta 4, 1.9.2-head)

**URL:** <https://www.ruby-forum.com/t/error-when-calling-to-sql-rails-3-beta-4-1-9-2-head/190469>\
**Category:** Rails\
**Created:** [June 21, 2010, 5:31am UTC](https://www.ruby-forum.com/t/error-when-calling-to-sql-rails-3-beta-4-1-9-2-head/190469 "2010-06-21T05:31:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@matthew](https://www.ruby-forum.com/u/matthew)\
**Post date:** [June 21, 2010, 5:31am UTC](https://www.ruby-forum.com/t/error-when-calling-to-sql-rails-3-beta-4-1-9-2-head/190469/1 "2010-06-21T05:31:47Z")

</div>

I’m testing Rails 3 beta 4 on Ruby 1.9.2-head, and when I start a  
console and do:

Game.first.to\_sql

I get this error:

ArgumentError: wrong number of arguments (0 for 1)

I know it can find the Game record, because when I type:

Game.first

it returns:

=\> #\<Game id: 1, name: “Galaga”, created\_at: “2010-06-19 11:02:37”,  
updated\_at: “2010-06-19 11:02:37”\>

What am I missing? I just want to make the to\_ql work in a very simple  
case.
