Displaying 20 results from an estimated 200 matches similar to: "[Sybase Adaptor] find_by_xxx does not work correctly."
2009 Sep 08
2
Rails + Sybase ASE : group effort, please
Here''s what I have:
Ruby 1.8.7
Rails 2.3.3 (activerecord 2.3.3, etc)
activerecord-sybase-adapter ( http://itsignals.cascadia.com.au/?p=23 )
Here is the base code (login info was changed to protect me)
require ''rubygems''
require ''activerecord''
a = ActiveRecord::Base.establish_connection(
:adapter => "sybase",
:host =>
2009 Aug 28
0
Error connecting to Sybase (odd)
I have activerecord-sybase-adapter installed -- and Sybase itself, so I
have the drivers.
In irb or in the rails console, this works:
ActiveRecord::Base.establish_connection(
:adapter => “sybase”,
:database => “mydb”,
:host => “myhost”,
:myport => myport,
:username => “read_only”,
:password => “read_only”)
In Rails, I have this in my database.yml:
pacs:
adapter: sybase
2009 Oct 14
18
sybase in rails2?
Has anyone actually gotten the activerecord-sybase-adapter to work in
Rails2?
I can''t seem to, and can''t figure out why. I am on RedHat linux.
I have the sybase client libraries installed, I have the adapter
installed. After installing the patch at
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2455-update-for-sybase_adapter#ticket-2455-4
to get a slightly
2006 Mar 03
0
binary_to_string/string_to_binary confusion
I am attempting to write a FrontBase activerecord adaptor. I''m down
to only two unit tests failing, and one of them is binary_test.rb.
I can''t figure out the logic of binary to string conversion.
Internally, I want the ''data'' attribute to be a String object
identical to the contents of
BINARY_FIXTURE_PATH = File.dirname(__FILE__) +
2010 Apr 28
1
Trying to get Rails working with Sybase ASE
Hi
I''m trying to use the activerecord-sybase-adapter to be able to use ASE with
my rails applications.
But, I am struggling...
I followed (most of) the steps on this informative page:
http://trevoke.net/blog/2009/09/11/connecting-to-sybase-with-rails-on-windows-xp/
Initially I had Rails 2.3.5 installed.
I copied the "Ruby Sybase files" as instructed and the Sybase dll files
2008 Sep 25
1
defining polymorphic type condition
As great as Rails 2.1 is, I for the life of me cannot figure out why
polymorphic associations do not support reconfiguring the type column
used.
For example, I have no way to do a polymorphic association using a
lookup hash which maps an integer to a class name.
Storing a TINYINT unsigned is waaaaay more efficient than storing a
string like "SomeActiveRecordModel" over and over again.
2008 Feb 20
0
Unicode Support for MS SQL Server
In order to coerce Rails 1.2.x into supporting Unicode values for an
attribute in a model, I found I had to do the following:
1) Change the underlying column type from varchar to nvarchar.
2) Prepend any quoted values going into nvarchar columns with a
capital-letter-N, e. g. ''unicode'' becomes N''unicode'' In order to
accomplish this, I modified
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
2009 Dec 28
2
Override .find, .find_by_id, etc...
I read these:
http://www.ruby-forum.com/topic/185297#new
http://www.freezzo.com/2008/05/14/override-default-find-conditions-for-model/
it works, it override the .find perfectly, however it does not cover
.find_by_id or other .find_by_XXX
Is there anyway to override all the find function of a modal? I want to
set the default "select" for User modal, only return name and id, but
not the
2007 Aug 01
0
super() inside quote() of database adapters
4 days into RoR and I am fixing db adapter bugs, didn''t expect
that ;-) In working to fix a bug in the quote() method of the
sybase_adapter.rb which causes it to incorrectly drop quotes of a
value that goes into a string column if the value is a number, I have
noticed that super() has the quoting of the value correct.
I am very new to RoR and Ruby, it seems to me that
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
2006 Jan 09
3
rails ignoring the migration file
I have a mysql database that I am trying to use migrations on. The
problem that I am having is that when I create a blob field in my
migration file like so:
t.column "data", :binary, :limit => 15.megabytes, :null => false
rails changes it to this in the schema:
t.column "data", :binary, :default => "", :null => false
not only is this not what I wanted
2005 Dec 16
1
acts_as_taggable sql injection vulnerability
Hey everyone!
If you''re using acts_as_taggable <= 1.04, (erm, any version, I
think..) please fix your local copy right now! There are numerous sql
sanitization holes in this library.
I notified Obie of this over a month ago, so hopefully he''s fixed it.
How to tell lif you''re vulnerable
======================
Make a tag with a single quote in it. See if raises an
2007 Jul 30
3
validates_uniqueness_of doesn't work if value tested is numeric and column is string
Hello all,
I am working through the depot example in the rails book. If I add a
validates_uniqueness_of to a string column in the model, and then try
to create a record with a number in this string column I get an SQL
error. Looks like the SQL generated to test for uniqueness does not
quote the value if it''s numeric even though it''s comparing against a
varchar column. It does
2006 Jan 01
11
Migration db_schema_import always fails.
I have not been able to get DB migrations to work at all in Rails 1.0
for me. On multiple platforms I continually get the same errors. It
took me awhile to figure out 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
2006 Feb 01
5
Sybase ctlib Adapter
Hi,
I''ve been trying to update Will Sobel''s sybase-ctlib adapter to pass
unit tests on Rails 1.0. It''s been a slow, sloggy process for me so
far, as I''ve been learning Ruby, Rails, and Sybase administration all
in one go. (c: It''s been a saving grace to have a good starting
point (thanks Will!).
http://dev.rubyonrails.org/ticket/2030
2006 Feb 23
3
has_many reference
I am trying to do something right from Agile Web Dev with Rails book
and it does not work. I must be missing something obvious.
I have a one-to-many relationship:
class Draft < ActiveRecord::Base
has_many :endorsees
end
class Endorsees < ActiveRecord:: Base
belongs_to :draft
end
>From my reading, methinks I should be able to say:
d = Draft.new
d.endorsees << Endorsee.new
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
2006 Jan 22
0
MySQL Adaptor on WinXP Dual CPU machine broken?
When I run using webrick on a dual WinXP SP2 machine it crashes
intmittently at random locations.
If the page has no MySQL lookups in it it will go and go forever. The
moment I put one
MyModel.find(:first) into the controller. Webrick starts crashing
again. Crash as in illegal access into low addresses of memory.
I have tried installing MySQL 4.1 and 5 GA as well as uninstalling and
2012 Mar 23
1
ffmpeg adaptor for ogg123
Hi all,
I'm not sure if this is interesting to you guys (I'm also not 100%
convinced this is the correct list) but I hacked up an adaptor for ogg123
to allow it to use ffmpeg as a decoder. It currently only recognises WMA
files (I wanted to be able to play my wife's music from my Linux music
server) but it would be trivial to extend to any other formats ffmpeg
supports. Anyway, if