I''m getting this error in webrick then it crashes leaving nothing in
the
log.
ruby: symbol lookup error:
/usr/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.so: undefined symbol:
mysql_sqlstate
Here is the standard query I would normally write to get the data.
select * from child,parent
where CONCAT(SUBSTRING(child.item_number,1,14,''00'') =
parent.order_number and parent.order_number =
''4444444444444400''
Here are my models and my database.yml
class Parent < ActiveRecord::Base
set_table_name :parent
set_primary_key :order_number
has_many :child,
:class_name =>
''AppName'',
:finder_sql =>
"select child.* from child,parent " +
"
where CONCAT(SUBSTRING(child.item_number,1,14,''00'') =
parent.order_number"
end
class Child < ActiveRecord::Base
set_table_name :child
set_primary_key :item_number
belongs_to :parent,
:foreign_key =>
''order_number'',
:class_name
=> BeeOrder
end
development:
adapter: mysql
database: legacy_test
username: john
password: doe
# socket: /var/lib/mysql/mysql.sock
host: my_host
port: 3306
I"ve been pulling my hair out for a week trying to get this legacy
database working! Please help!
--
Posted via http://www.ruby-forum.com/.
This is the correct model name, in my hast to change the names before I
posted I forgot to change this one. Can anyone help?
Here are my models and my database.yml
class Parent < ActiveRecord::Base
set_table_name :parent
set_primary_key :order_number
has_many :child,
:class_name =>
''Child'',
:finder_sql =>
"select child.* from child,parent " +
"
where CONCAT(SUBSTRING(child.item_number,1,14,''00'')
> Here are my models and my database.yml
>
> class Parent < ActiveRecord::Base
> set_table_name :parent
> set_primary_key :order_number
> has_many :child,
> :class_name =>
> ''AppName'',
> :finder_sql =>
> "select child.* from child,parent " +
>
"
> where CONCAT(SUBSTRING(child.item_number,1,14,''00'') =
--
Posted via http://www.ruby-forum.com/.
...,1,14 ) , ''00'') = ... missing '')'' perhaps? At 1/18/2006 09:35 AM, you wrote:>This is the correct model name, in my hast to change the names before I >posted I forgot to change this one. Can anyone help? > > >Here are my models and my database.yml > > class Parent < ActiveRecord::Base > set_table_name :parent > set_primary_key :order_number > has_many :child, > :class_name => > ''Child'', > :finder_sql => >"select child.* from child,parent " + > >" >where CONCAT(SUBSTRING(child.item_number,1,14,''00'') > > > > > > Here are my models and my database.yml > > > > class Parent < ActiveRecord::Base > > set_table_name :parent > > set_primary_key :order_number > > has_many :child, > > :class_name => > > ''AppName'', > > :finder_sql => > > "select child.* from child,parent " + > > > " > > where CONCAT(SUBSTRING(child.item_number,1,14,''00'') > >-- >Posted via http://www.ruby-forum.com/. >_______________________________________________ >Rails mailing list >Rails@lists.rubyonrails.org >http://lists.rubyonrails.org/mailman/listinfo/rails-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060118/ecc33006/attachment.html