stitcher
2007-Aug-10 04:17 UTC
Sybase Adapter for Ruby on Rails on Windows 2000 - abnormal application termination
Hi! I''m trying to use Sybase adapter to connect to legacy Sybase ASE 12.5, I''ve copied all the required libraries to the appropriate places :-)) But the strange thing is that I can query the database only twice. The third call just crashes ROR server (both WEBrick or Mongrel). The message I get is - abnormal program termination Process finished with exit code 3 I''m using plain model, empty. And the call is like @profiles Profile.find(:all) The table contains 20 rows. I can even query another table, with millions of rows, but again only twice. My RapidSQL client works just fine with this database. As well as plugin for IDEA. Where can I look for a problem? Should I upgrade my OpenClient to verson 15? Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
stitcher
2007-Aug-10 15:25 UTC
Re: Sybase Adapter for Ruby on Rails on Windows 2000 - abnormal application termination
I have upgraded Sybase Open Client to version 15.0.1 Still getting the same error. Ruby just crashes. Is anyone here using Sybase from Ruby on Rails on Windows? Give me a hint, please? Andrey On Aug 10, 12:17 am, stitcher <myatl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi! > > I''m trying to use Sybase adapter to connect to legacy Sybase ASE 12.5, > I''ve copied all the required libraries to the appropriate places :-)) > > But the strange thing is that I can query the database only twice. The > third call just crashes ROR server (both WEBrick or Mongrel). The > message I get is - > > abnormal program termination > Process finished with exit code 3 > > I''m using plain model, empty. And the call is like @profiles > Profile.find(:all) > The table contains 20 rows. I can even query another table, with > millions of rows, but again only twice. > > My RapidSQL client works just fine with this database. As well as > plugin for IDEA. > > Where can I look for a problem? Should I upgrade my OpenClient to > verson 15? > > Thanks!--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
jrun
2007-Aug-13 12:33 UTC
Re: Sybase Adapter for Ruby on Rails on Windows 2000 - abnormal application termination
I faintly remember having a similar problem on RHEL. Unfortunately i can''t remember the solution. Here are some of my experiences with Sybase and Rails, hopefully they''ll help. To give you an idea of our environment, I develop on windows xp (and a mac) using a local mysql server. We have stagging and production environments running RHEL4 which connect to Sybase running on separate AIX servers. 1. Package up the sybase-ctlib binaries into a gem This makes for easier distribution of the binaries. 2. Verify sybase-ctlib works without Rails Removing Rails from the equation helps shrink the scope of the problem. Having a gem here makes things easier. For example, via irb: gem ''sybase-ctlib-15'' require ''sybsql'' Then take a look at sybsql.rb for examples. 3. environment.rb I had a problem getting sybase-ctlib in the load path. Here is the beginning of the config/environment.rb that works for me. Rails::Initializer.run do |config| # Put the Sybase bindings into ruby''s load path. It doesn''t work if # added to the config#load_paths. This is being done here because # it doesn''t seem to work in the individual environment files. if ENV["RAILS_ENV"] =~ /production|staging/ $:.unshift(File.expand_path("#{RAILS_ROOT}/vendor/sybase-ctlib/ lib")) end 4. sybinit.err When there are errors the sybase client produces a file called sybinit.err in RAILS_ROOT. HTH - jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
stitcher
2007-Aug-13 14:27 UTC
Re: Sybase Adapter for Ruby on Rails on Windows 2000 - abnormal application termination
Thank you, Jeremy! I can execute multiple requests to Sybase, and get the reslts back, but then after number of requests the application terminates. For example in test script: 6.times do # Sending a sql-command to the server query.sql("select * from my_table") end 6 times goes well, 7 times terminates the application. And I cannot find sybinit.err or any references to it in the documentation. Andrey On Aug 13, 8:33 am, jrun <jeremy.bu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I faintly remember having a similar problem on RHEL. Unfortunately i > can''t remember the solution. Here are some of my experiences with > Sybase and Rails, hopefully they''ll help. To give you an idea of our > environment, I develop on windows xp (and a mac) using a local mysql > server. We have stagging and production environments running RHEL4 > which connect to Sybase running on separate AIX servers. > > 1. Package up the sybase-ctlib binaries into a gem > > This makes for easier distribution of the binaries. > > 2. Verify sybase-ctlib works without Rails > > Removing Rails from the equation helps shrink the scope of the > problem. Having a gem here makes things easier. For example, via irb: > > gem ''sybase-ctlib-15'' > require ''sybsql'' > > Then take a look at sybsql.rb for examples. > > 3. environment.rb > > I had a problem getting sybase-ctlib in the load path. Here is the > beginning of the config/environment.rb that works for me. > > Rails::Initializer.run do |config| > # Put the Sybase bindings into ruby''s load path. It doesn''t work if > # added to the config#load_paths. This is being done here because > # it doesn''t seem to work in the individual environment files. > if ENV["RAILS_ENV"] =~ /production|staging/ > $:.unshift(File.expand_path("#{RAILS_ROOT}/vendor/sybase-ctlib/ > lib")) > end > > 4. sybinit.err > > When there are errors the sybase client produces a file called > sybinit.err in RAILS_ROOT. > > HTH > > - jeremy--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
jrun
2007-Aug-14 13:48 UTC
Re: Sybase Adapter for Ruby on Rails on Windows 2000 - abnormal application termination
sybint.err must be specific to the linux client. Looking through sybsql.rb and i noticed you can get some more debug info by setting $DEBUG = true. Maybe that can give you a little more info. I also had a problem with the client locale not matching the server locale. I doubt that''s the problem because i receive a very explicit message but it''s worthing looking into. On the client machine make sure the server local is in $SYBASE\locales\locales.dat under the client OS, in this case "[NT]". Is it always 6 queries or does it appear to be random? Do you have a Windows XP machine to try this on? - jeremy On Aug 13, 9:27 am, stitcher <myatl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thank you, Jeremy! > > I can execute multiple requests to Sybase, and get the reslts back, > but then after number of requests the application terminates. > > For example in test script: > > 6.times do > # Sending a sql-command to the server > query.sql("select * from my_table") > end > > 6 times goes well, 7 times terminates the application. > > And I cannot find sybinit.err or any references to it in the > documentation. > > Andrey > > On Aug 13, 8:33 am, jrun <jeremy.bu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I faintly remember having a similar problem on RHEL. Unfortunately i > > can''t remember the solution. Here are some of my experiences with > > Sybase and Rails, hopefully they''ll help. To give you an idea of our > > environment, I develop on windows xp (and a mac) using a local mysql > > server. We have stagging and production environments running RHEL4 > > which connect to Sybase running on separate AIX servers. > > > 1. Package up the sybase-ctlib binaries into a gem > > > This makes for easier distribution of the binaries. > > > 2. Verify sybase-ctlib works without Rails > > > Removing Rails from the equation helps shrink the scope of the > > problem. Having a gem here makes things easier. For example, via irb: > > > gem ''sybase-ctlib-15'' > > require ''sybsql'' > > > Then take a look at sybsql.rb for examples. > > > 3. environment.rb > > > I had a problem getting sybase-ctlib in the load path. Here is the > > beginning of the config/environment.rb that works for me. > > > Rails::Initializer.run do |config| > > # Put the Sybase bindings into ruby''s load path. It doesn''t work if > > # added to the config#load_paths. This is being done here because > > # it doesn''t seem to work in the individual environment files. > > if ENV["RAILS_ENV"] =~ /production|staging/ > > $:.unshift(File.expand_path("#{RAILS_ROOT}/vendor/sybase-ctlib/ > > lib")) > > end > > > 4. sybinit.err > > > When there are errors the sybase client produces a file called > > sybinit.err in RAILS_ROOT. > > > HTH > > > - jeremy--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
stitcher
2007-Aug-14 20:21 UTC
Re: Sybase Adapter for Ruby on Rails on Windows 2000 - abnormal application termination
Jeremy, Setting the $DEBUG flag didn''t help much, the messages are non- informative. But thank you for the info. We also tried to tweak Sybase in some ways, we have a great DBA, but it didn''t help. I was able to test the application on Win XP and for the number of tests I''ve performed Ruby never crashed. I just copied InstantRails from my machine to the test one. And Sybase install is the same on both. Yes, the retry numbers are exact. But what freakens me out is that if I change the table name, I can get more or less results back. And I do select * in all cases. And the numbers are stable, if it''s 14 for this table, then it''s 14 in the morning and in the evening, even with machine reboot and if the threshold is 6, then its 6 all the time. One last time I''ve got a windows error message - ruby.exe crashed with error code -1073741819. I looked the code up and haven''t found any Ruby references to it, except for one Japanese site with Ruby test results and the same abnormal application termination and the same error code. The article is dated by 2004. I guess the best way to go is upgrade the workstation and forget this issue. Seems nobody else is having it :-)) Andrey On Aug 14, 9:48 am, jrun <jeremy.bu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> sybint.err must be specific to the linux client. > > Looking through sybsql.rb and i noticed you can get some more debug > info by setting $DEBUG = true. Maybe that can give you a little more > info. > > I also had a problem with the client locale not matching the server > locale. I doubt that''s the problem because i receive a very explicit > message but it''s worthing looking into. On the client machine make > sure the server local is in $SYBASE\locales\locales.dat under the > client OS, in this case "[NT]". > > Is it always 6 queries or does it appear to be random? Do you have a > Windows XP machine to try this on? > > - jeremy > > On Aug 13, 9:27 am, stitcher <myatl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Thank you, Jeremy! > > > I can execute multiple requests to Sybase, and get the reslts back, > > but then after number of requests the application terminates. > > > For example in test script: > > > 6.times do > > # Sending a sql-command to the server > > query.sql("select * from my_table") > > end > > > 6 times goes well, 7 times terminates the application. > > > And I cannot find sybinit.err or any references to it in the > > documentation. > > > Andrey > > > On Aug 13, 8:33 am, jrun <jeremy.bu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > I faintly remember having a similar problem on RHEL. Unfortunately i > > > can''t remember the solution. Here are some of my experiences with > > > Sybase and Rails, hopefully they''ll help. To give you an idea of our > > > environment, I develop on windows xp (and a mac) using a local mysql > > > server. We have stagging and production environments running RHEL4 > > > which connect to Sybase running on separate AIX servers. > > > > 1. Package up the sybase-ctlib binaries into a gem > > > > This makes for easier distribution of the binaries. > > > > 2. Verify sybase-ctlib works without Rails > > > > Removing Rails from the equation helps shrink the scope of the > > > problem. Having a gem here makes things easier. For example, via irb: > > > > gem ''sybase-ctlib-15'' > > > require ''sybsql'' > > > > Then take a look at sybsql.rb for examples. > > > > 3. environment.rb > > > > I had a problem getting sybase-ctlib in the load path. Here is the > > > beginning of the config/environment.rb that works for me. > > > > Rails::Initializer.run do |config| > > > # Put the Sybase bindings into ruby''s load path. It doesn''t work if > > > # added to the config#load_paths. This is being done here because > > > # it doesn''t seem to work in the individual environment files. > > > if ENV["RAILS_ENV"] =~ /production|staging/ > > > $:.unshift(File.expand_path("#{RAILS_ROOT}/vendor/sybase-ctlib/ > > > lib")) > > > end > > > > 4. sybinit.err > > > > When there are errors the sybase client produces a file called > > > sybinit.err in RAILS_ROOT. > > > > HTH > > > > - jeremy--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
stitcher
2007-Sep-07 19:04 UTC
Re: Sybase Adapter for Ruby on Rails on Windows 2000 - abnormal application termination
The workaround was found - install VMWare and run the development under WinXP. On Aug 14, 4:21 pm, stitcher <myatl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Jeremy, > > Setting the $DEBUG flag didn''t help much, the messages are non- > informative. But thank you for the info. We also tried to tweak Sybase > in some ways, we have a great DBA, but it didn''t help. > > I was able to test the application on Win XP and for the number of > tests I''ve performed Ruby never crashed. I just copied InstantRails > from my machine to the test one. And Sybase install is the same on > both. > > Yes, the retry numbers are exact. But what freakens me out is that if > I change the table name, I can get more or less results back. And I do > select * in all cases. And the numbers are stable, if it''s 14 for this > table, then it''s 14 in the morning and in the evening, even with > machine reboot and if the threshold is 6, then its 6 all the time. > > One last time I''ve got a windows error message - ruby.exe crashed with > error code -1073741819. I looked the code up and haven''t found any > Ruby references to it, except for one Japanese site with Ruby test > results and the same abnormal application termination and the same > error code. The article is dated by 2004. > > I guess the best way to go is upgrade the workstation and forget this > issue. Seems nobody else is having it :-)) > > Andrey > > On Aug 14, 9:48 am, jrun <jeremy.bu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > sybint.err must be specific to the linux client. > > > Looking through sybsql.rb and i noticed you can get some more debug > > info by setting $DEBUG = true. Maybe that can give you a little more > > info. > > > I also had a problem with the client locale not matching the server > > locale. I doubt that''s the problem because i receive a very explicit > > message but it''s worthing looking into. On the client machine make > > sure the server local is in $SYBASE\locales\locales.dat under the > > client OS, in this case "[NT]". > > > Is it always 6 queries or does it appear to be random? Do you have a > > Windows XP machine to try this on? > > > - jeremy > > > On Aug 13, 9:27 am, stitcher <myatl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Thank you, Jeremy! > > > > I can execute multiple requests to Sybase, and get the reslts back, > > > but then after number of requests the application terminates. > > > > For example in test script: > > > > 6.times do > > > # Sending a sql-command to the server > > > query.sql("select * from my_table") > > > end > > > > 6 times goes well, 7 times terminates the application. > > > > And I cannot find sybinit.err or any references to it in the > > > documentation. > > > > Andrey > > > > On Aug 13, 8:33 am, jrun <jeremy.bu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I faintly remember having a similar problem on RHEL. Unfortunately i > > > > can''t remember the solution. Here are some of my experiences with > > > > Sybase and Rails, hopefully they''ll help. To give you an idea of our > > > > environment, I develop on windows xp (and a mac) using a local mysql > > > > server. We have stagging and production environments running RHEL4 > > > > which connect to Sybase running on separate AIX servers. > > > > > 1. Package up the sybase-ctlib binaries into a gem > > > > > This makes for easier distribution of the binaries. > > > > > 2. Verify sybase-ctlib works without Rails > > > > > Removing Rails from the equation helps shrink the scope of the > > > > problem. Having a gem here makes things easier. For example, via irb: > > > > > gem ''sybase-ctlib-15'' > > > > require ''sybsql'' > > > > > Then take a look at sybsql.rb for examples. > > > > > 3. environment.rb > > > > > I had a problem getting sybase-ctlib in the load path. Here is the > > > > beginning of the config/environment.rb that works for me. > > > > > Rails::Initializer.run do |config| > > > > # Put the Sybase bindings into ruby''s load path. It doesn''t work if > > > > # added to the config#load_paths. This is being done here because > > > > # it doesn''t seem to work in the individual environment files. > > > > if ENV["RAILS_ENV"] =~ /production|staging/ > > > > $:.unshift(File.expand_path("#{RAILS_ROOT}/vendor/sybase-ctlib/ > > > > lib")) > > > > end > > > > > 4. sybinit.err > > > > > When there are errors the sybase client produces a file called > > > > sybinit.err in RAILS_ROOT. > > > > > HTH > > > > > - jeremy--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---