Hi, I''m trying to migrate the AR script on to Oracle database. Im using jdbc adapter. There are number of functions defined in jdbc_oracle.rb, but when I call them (eg: rename_column(...)) in my AR script, it says "rake aborted !! rename_column is not implemented" . It is not referring to the jdbc_oracle.rb file. Is there any configuration setting to be done? I have written many custom functions in jdbc_postgre.rb and jdbc_mssql.rb, it works absolutely fine. Please find the sample code attached. 1. 001_rename_columns.rb (file to migrate) class CreateOrclTables < ActiveRecord::Migration def self.up rename_column(:companyprofile, :tname, :tname_new) end def self.down end end 2. database.yml development_orcl1: adapter: jdbc username: scott password: tiger driver: com.inet.ora.OraDriver url: jdbc:inetora:vxind01:1521:BAPCDEV1 3. jdbc_oracle.rb (adapter: jdbc) The file is under ( D:\jruby-1.0.0RC1\lib\ruby\gems\1.8\gems\ActiveRecord-JDBC-0.3.1\lib\jdbc_adapter ) Please refer the jdbc_oracle.rb file attached. Appreciate your response !! Thanks, John Attachments: http://www.ruby-forum.com/attachment/1832/jdbc_oracle.rb -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Fri, May 2, 2008 at 6:28 AM, John Ebenezer <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi, > > I''m trying to migrate the AR script on to Oracle database. Im using jdbc > adapter. > > There are number of functions defined in jdbc_oracle.rb, but when I call > them (eg: rename_column(...)) in my AR script, it says "rake aborted !! > rename_column is not implemented" . > It is not referring to the jdbc_oracle.rb file. Is there any > configuration setting to be done? > > I have written many custom functions in jdbc_postgre.rb and > jdbc_mssql.rb, it works absolutely fine. > > Please find the sample code attached. > > 1. 001_rename_columns.rb (file to migrate) > > class CreateOrclTables < ActiveRecord::Migration > def self.up > rename_column(:companyprofile, :tname, :tname_new) > end > def self.down > end > end > > 2. database.yml > > development_orcl1: > adapter: jdbc > username: scott > password: tiger > driver: com.inet.ora.OraDriver > url: jdbc:inetora:vxind01:1521:BAPCDEV1 > > 3. jdbc_oracle.rb (adapter: jdbc) > > The file is under ( > D:\jruby-1.0.0RC1\lib\ruby\gems\1.8\gems\ActiveRecord-JDBC-0.3.1\lib\jdbc_adapter > ) > > Please refer the jdbc_oracle.rb file attached.Do you have the requisite configuration in environment.rb to ensure that the jdbc adapter is loaded? See http://wiki.jruby.org/wiki/Running_Rails_with_ActiveRecord-JDBC for details. Also, 0.3.1 is pretty old (as is JRuby 1.0.0RC1). If you want to help develop the jdbc oracle support further it would be great if you could update to JRuby 1.1.1 and ar-jdbc 0.8. Finally, can we take this discussion over to the jruby-user list? http://xircles.codehaus.org/projects/jruby/lists Cheers, /Nick --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi Nick, Thanks for your response. I have the requisite configuration done in environment.rb. Below are the detials. require ''rubygems'' gem ''ActiveRecord-JDBC'' require ''jdbc_adapter'' Interesting part is, a simple create_table script works fine even when I deleted the contents of jdbc_oracle.rb file and made it blank. But when I deleted the file jdbc_oracle.rb from the folder, it throws an error "could not find file jdbc_oracle.rb". I had a look at http://xircles.codehaus.org/projects/jruby/lists There are number of email-ids, to which ID should I post the message or which is the relevant forum? Awaiting your response. Thanks, John Nick Sieger wrote:> On Fri, May 2, 2008 at 6:28 AM, John Ebenezer > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> configuration setting to be done? >> rename_column(:companyprofile, :tname, :tname_new) >> password: tiger >> driver: com.inet.ora.OraDriver >> url: jdbc:inetora:vxind01:1521:BAPCDEV1 >> >> 3. jdbc_oracle.rb (adapter: jdbc) >> >> The file is under ( >> D:\jruby-1.0.0RC1\lib\ruby\gems\1.8\gems\ActiveRecord-JDBC-0.3.1\lib\jdbc_adapter >> ) >> >> Please refer the jdbc_oracle.rb file attached. > > Do you have the requisite configuration in environment.rb to ensure > that the jdbc adapter is loaded? > > See http://wiki.jruby.org/wiki/Running_Rails_with_ActiveRecord-JDBC for > details. > > Also, 0.3.1 is pretty old (as is JRuby 1.0.0RC1). If you want to help > develop the jdbc oracle support further it would be great if you could > update to JRuby 1.1.1 and ar-jdbc 0.8. > > Finally, can we take this discussion over to the jruby-user list? > > http://xircles.codehaus.org/projects/jruby/lists > > Cheers, > /Nick-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sun, May 4, 2008 at 10:58 PM, John Ebenezer <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > I had a look at http://xircles.codehaus.org/projects/jruby/lists > > There are number of email-ids, to which ID should I post the message or > which is the relevant forum?The jruby-user list should be fine for this. /Nick --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks very much Nick !! I will post it there .. regards John. Nick Sieger wrote:> On Sun, May 4, 2008 at 10:58 PM, John Ebenezer > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> >> >> I had a look at http://xircles.codehaus.org/projects/jruby/lists >> >> There are number of email-ids, to which ID should I post the message or >> which is the relevant forum? > > The jruby-user list should be fine for this. > > /Nick-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---