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
on 02.05.2008 13:33
on 06.05.2008 07:29
Hi John,
It seems that the AR-JDBC-Adapter you use now is very old. pls install
the latest version and try again.
jruby -S gem install activerecord-jdbc-adapter
Cheers,
Jesse
on 09.05.2008 07:52
Thanks very much Jesse !! Can you send me the link to download this adapter? Also, would appreciate if you can send me the link of latest Jruby version. regards, John Jesse Hu wrote: > Hi John, > > It seems that the AR-JDBC-Adapter you use now is very old. pls install > the latest version and try again. > > jruby -S gem install activerecord-jdbc-adapter > > Cheers, > Jesse
on 09.05.2008 08:24
Hi John, Issue the following command to install the latest activerecord-jdbc-adapter version(0.8) remotely: jruby -S gem install activerecord-jdbc-adapter or download the gem from http://rubyforge.org/frs/download.php/34137/activerecord-jdbc-adapter-0.8.gem you need to install JRuby 1.1 or later to work with activerecord-jdbc-adapter 0.8. http://dist.codehaus.org/jruby/ Cheers, Jesse John Ebenezer wrote: > Thanks very much Jesse !! > > Can you send me the link to download this adapter? > > Also, would appreciate if you can send me the link of latest Jruby > version. > > regards, > John > > > Jesse Hu wrote: >> Hi John, >> >> It seems that the AR-JDBC-Adapter you use now is very old. pls install >> the latest version and try again. >> >> jruby -S gem install activerecord-jdbc-adapter >> >> Cheers, >> Jesse
on 13.05.2008 06:11
Thanks very much Jesse !! regards John Jesse Hu wrote: > Hi John, > > Issue the following command to install the latest > activerecord-jdbc-adapter version(0.8) remotely: > jruby -S gem install activerecord-jdbc-adapter > > or download the gem from > http://rubyforge.org/frs/download.php/34137/activerecord-jdbc-adapter-0.8.gem > > you need to install JRuby 1.1 or later to work with > activerecord-jdbc-adapter 0.8. http://dist.codehaus.org/jruby/ > > Cheers, > Jesse >