Feature #2272
closedRedmine on Oracle Database - Windows Installation
100%
Description
Hi folks!
This time i won't bother you with another problem to make Redmine compatible with Oracle.
I finally find a Oracle Adapter that fits with my environment.
What i've got:
ruby186-26 redmine-0.7.3 ruby-oci8-1.0.3-mswin32 activerecord-oracle_enhanced-adapter 1.1.8 Oracle Database XE Windows XP Professional SP3
The steps i ran were:
1 - Installing Ruby (http://rubyforge.org/frs/download.php/29263/ruby186-26.exe) and put it on Windows PATH
2 - Unzipped Redmine (http://rubyforge.org/frs/download.php/39478/redmine-0.7.3.zip)
3 - I did some changes on \db\migrate\001_setup.rb as:
create_table "projects", :force => true do |t| t.column "name", :string, :limit => 30, :default => "", :null => false t.column "description", :text, :default => nil, :null => true t.column "homepage", :string, :limit => 60, :default => "" t.column "is_public", :boolean, :default => true, :null => false t.column "parent_id", :integer t.column "projects_count", :integer, :default => 0 t.column "created_on", :timestamp t.column "updated_on", :timestamp end
and
create_table "users", :force => true do |t| t.column "login", :string, :limit => 30, :default => "", :null => true t.column "hashed_password", :string, :limit => 40, :default => "", :null => true t.column "firstname", :string, :limit => 30, :default => "", :null => true t.column "lastname", :string, :limit => 30, :default => "", :null => false t.column "mail", :string, :limit => 60, :default => "", :null => true t.column "mail_notification", :boolean, :default => true, :null => false t.column "admin", :boolean, :default => false, :null => false t.column "status", :integer, :default => 1, :null => false t.column "last_login_on", :datetime t.column "language", :string, :limit => 2, :default => "" t.column "auth_source_id", :integer t.column "created_on", :timestamp t.column "updated_on", :timestamp end
4 - Other small changes on \db\migrate\091_change_changesets_revision_to_string.rb
class ChangeChangesetsRevisionToString < ActiveRecord::Migration def self.up change_column :changesets, :revision, :string end def self.down change_column :changesets, :revision, :integer end end
5 - Deleted the file \db\migrate\087_change_projects_description_to_text.rb
6 - Altered the \config\database.yml as follows:
production: adapter: oracle_enhanced host: <host>:1521:XE username: username password: pass
7 - Configured the \config\environment.rb to work with my SMTP address.
8 - Created on folder \config a sub-folder named initializers and put the file oracle_enhanced.rb with this:
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.emulate_dates_by_column_name = true ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.instance_eval do self.string_to_date_format = "%d/%m/%Y" self.string_to_time_format = "%d/%m/%Y %H:%M:%S" end
9 - Downloaded the oci8 (http://rubyforge.org/frs/download.php/41043/ruby-oci8-1.0.3-mswin32.rb) and installed as:
c:\ruby> ruby ruby-oci8-1.0.3-mswin32.rb
10 - Install the oracle_enhanced (http://rubyforge.org/frs/download.php/44889/activerecord-oracle_enhanced-adapter-1.1.8.gem) as follows:
c:\ruby> gem install activerecord-oracle_enhanced-adapter
11 - Create a user on OracleDB with DBA privilegies.
12 - Execute this command: c:\redmine> rake db:migrate RAILS_ENV=production
13 - Execute this command: c:\redmine> ruby script/server -e production
14 - Go to browser and: http://localhost:3000/
Congratulations!
You finished it!
Considerations:
001 - I can't load default data. An error occurred on inserting the collumn description due its size. 002 - The issues started at number 10000.
All other features are working fine. These considerations can be easily fixed with a minuncious analisys of adapter_enhanced. (I'm very occupied and can't see this for now - if someone could fix i apreciate it)
Hope i help the users who needs to use Redmine with Oracle.
I invite these people to test and validate the fix in this thread.
Cheers.
P.S: Sorry for the poor English.
Files
Related issues