Displaying 7 results from an estimated 7 matches for "string_to_binary".
2006 Mar 04
1
active migration gives undefined_method ''string_to_binary''
has anyone ever seen that:
c:\rails\test>rake migrate --trace
(in c:/rails/test)
** Invoke migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute migrate
rake aborted!
undefined method `string_to_binary'' for
ActiveRecord::ConnectionAdapters::ColumnDefinition:Class
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapt
er.rb:119:in
`quote''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract...
2006 Mar 03
0
binary_to_string/string_to_binary confusion
...written to the database, it should be hex-encoded similar
to the following:
INSERT INTO binaries ("id", "data") VALUES(1, X''D20A0E21390A684AC0A80116'')
only with the hex portion being much larger.
I''m having trouble implementing binary_to_string and string_to_binary.
If I implement both of them to simply return value, then the first two
asserts pass:
assert @data == bin.data, ''Newly assigned data differs from original''
assert @data == bin.data, ''Data differs from original after save''
but the generated SQL is invalid becau...
2006 Jan 09
3
rails ignoring the migration file
...> "", :null => false
not only is this not what I wanted because it removes the size
restrictions it also blows up when you try to do rake db_import_schema
with this error:
site_path>rake db_schema_import
(in D:/sites/itsthes/itsthes-ruby/itsthes)
rake aborted!
undefined method `string_to_binary'' for
ActiveRecord::ConnectionAdapters::ColumnDefinition:Class
Is anyone else know why this is happening? Does anyone else have a
problem with rails converting values in the schema.rb to something
other than what is in the migration file?
Thanks,
Mark
--
--------------------------------...
2006 Jan 01
11
Migration db_schema_import always fails.
...some initial things, such as Migrations
don''t seem to support Enum column types, and doesn''t really support
Foreign key relationships (the constraints at least). After changing
my DB schema to jive more with the migrations engine, I now get the
following error.
undefined method `string_to_binary'' for
ActiveRecord::ConnectionAdapters::ColumnDefinition:Class
This happens for me on Windows, Linux, MacOX, ruby 1.8.2/1.8.4, rails
1.0, mySQL 4.1.14.
looking at the error, it looks like there might be some sort of bug
with a backtick/single-quote mismatch.
Migration db_schema_import alw...
2007 Apr 03
0
[Sybase Adaptor] find_by_xxx does not work correctly.
...ase_adapter.rb
279 def quote(value, column = nil)
280 return value.quoted_id if value.respond_to?
(:quoted_id)
281
282 case value
283 when String
284 if column && column.type == :binary &&
column.class.respond_to?(:string_to_binary)
285
"#{quote_string(column.class.string_to_binary(value))}"
286 elsif @numconvert && force_numeric?(column) &&
value =~ /^[+-]?[0-9]+$/o <-- here
287 value
288 else
289 "''#{quote_stri...
2006 Oct 19
3
Selecting datetime values from SQL Server (year < 1970)
All,
Rails 1.1.6.
Any AR find() call that generates a SELECT * type query against a table
with a DATETIME column in SQL Server whose value occurs before 1970 will
fail, because of the coercion of SQL Server datetime types to Time
values in Ruby.
See sqlserver_adapter.rb line 490
(record[col] = record[col].to_time if record[col].is_a? DBI::Timestamp)
If I remove the coercion (just commenting
2006 Jan 20
47
SQL Server datetime error
i have a problem with the datetime format of rails. i am unable to save
a dataset to the db. here''s the error message -- the original error
message was in german, so i translated it -- i get:
DBI::DatabaseError: Execute
OLE error code:80040E07 in Microsoft OLE DB Provider for SQL Server
Couldn''t convert a char-Datatype to datetime
HRESULT error code:0x80020009