# Problem loading data from database

**URL:** <https://www.ruby-forum.com/t/problem-loading-data-from-database/88163>\
**Category:** Rails\
**Created:** [March 8, 2007, 4:32pm UTC](https://www.ruby-forum.com/t/problem-loading-data-from-database/88163 "2007-03-08T16:32:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eyp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/e274bd/32.png) [@eyp](https://www.ruby-forum.com/u/eyp)\
**Post date:** [March 8, 2007, 4:32pm UTC](https://www.ruby-forum.com/t/problem-loading-data-from-database/88163/1 "2007-03-08T16:32:19Z")

</div>

Hello, I get this error trying to load some data from DB. I’m using  
Rails 1.2.2 on Fedora Core 6 and Sybase adapter.  
This worked fine when application run under Rails 1.1.6 but now I’m  
migrating to 1.2.2 and have some problems.

At browser I got:

SQL Command for table\_structure for tplib\_bckps failed  
Message: schema\_info not found. Specify owner.objectname or use  
sp\_help to check whether the object exists (sp\_help may produce lots  
of output).

And in the log file:

Setting row count to (0)  
SQL Command failed!  
\*\* SybSQLContext Server Message: \*\*  
Message number 208 Severity 16 State 1 Line 1  
Server SYBDESA  
Procedure  
Message String: schema\_info not found. Specify owner.objectname or  
use sp\_help to check whether the object exists (sp\_help may produce  
lots of output).

SQL (0.000000) RuntimeError: SQL Command Failed for : SELECT  
version FROM schema\_info  
Message: schema\_info not found. Specify owner.objectname or use  
sp\_help to check whether the object exists (sp\_help may produce lots  
of output).  
: SELECT version FROM schema\_info

Someone got this error?, any help?

---

<div class="post-metadata">

**Author:** ![eyp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/e274bd/32.png) [@eyp](https://www.ruby-forum.com/u/eyp)\
**Post date:** [March 8, 2007, 4:40pm UTC](https://www.ruby-forum.com/t/problem-loading-data-from-database/88163/2 "2007-03-08T16:40:20Z")

</div>

Eduardo Yáñez Parareda wrote:

> of output).  
> use sp\_help to check whether the object exists (sp\_help may produce  
> lots of output).
> 
> SQL (0.000000) RuntimeError: SQL Command Failed for : SELECT  
> version FROM schema\_info  
> Message: schema\_info not found. Specify owner.objectname or use  
> sp\_help to check whether the object exists (sp\_help may produce lots  
> of output).  
> : SELECT version FROM schema\_info
> 
> Someone got this error?, any help?

schema\_info is a small table that Rails uses to track which version of  
your db migrations is in your database.

If you run “rake db:migrate” it should build it for you automatically.

In MySQL the table looks like this:

±--------±--------±-----±----±--------±------+  
| Field | Type | Null | Key | Default | Extra |  
±--------±--------±-----±----±--------±------+  
| version | int(11) | YES | | NULL | |  
±--------±--------±-----±----±--------±------+

–  
Michael W.

---

<div class="post-metadata">

**Author:** ![eyp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/e274bd/32.png) [@eyp](https://www.ruby-forum.com/u/eyp)\
**Post date:** [March 8, 2007, 7:26pm UTC](https://www.ruby-forum.com/t/problem-loading-data-from-database/88163/3 "2007-03-08T19:26:47Z")

</div>

> schema\_info is a small table that Rails uses to track which version of  
> your db migrations is in your database.
> 
> If you run “rake db:migrate” it should build it for you automatically.

but I don’t need any migrations. I work on a legacy database. Where  
could I declare that I don’t need migrations?  
I’ve removed migrations directory from db directory, but it gives me  
the same error.

---

<div class="post-metadata">

**Author:** ![eyp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/e274bd/32.png) [@eyp](https://www.ruby-forum.com/u/eyp)\
**Post date:** [March 9, 2007, 4:39am UTC](https://www.ruby-forum.com/t/problem-loading-data-from-database/88163/4 "2007-03-09T04:39:58Z")

</div>

Eduardo Yáñez Parareda wrote:

> > schema\_info is a small table that Rails uses to track which version of  
> > your db migrations is in your database.
> > 
> > If you run “rake db:migrate” it should build it for you automatically.
> 
> but I don’t need any migrations. I work on a legacy database. Where  
> could I declare that I don’t need migrations?  
> I’ve removed migrations directory from db directory, but it gives me  
> the same error.

Sorry I don’t know why Rails would be trying to access that table if you  
aren’t running a migration task. You may want to try and trace through  
and see what statements are triggering that SQL to be run.

–  
Michael W.
