diff options
author | Antonio Cangiano <acangiano@gmail.com> | 2008-10-03 01:50:45 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-10-04 13:54:27 +0100 |
commit | f0e90740d0ca35b3fae5cf367334929534c35555 (patch) | |
tree | 8632b5b8f4412b264daf75db7c00951f404f884e /railties | |
parent | 1bc267d21679408b3624d1c697656ec250c01972 (diff) | |
download | rails-f0e90740d0ca35b3fae5cf367334929534c35555.tar.gz rails-f0e90740d0ca35b3fae5cf367334929534c35555.tar.bz2 rails-f0e90740d0ca35b3fae5cf367334929534c35555.zip |
Add IMB DB support to Rails application generator. [#1136 state:resolved]
Usage : rails app_name -d ibm_db
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'railties')
-rw-r--r-- | railties/configs/databases/ibm_db.yml | 62 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/app_generator.rb | 2 |
2 files changed, 63 insertions, 1 deletions
diff --git a/railties/configs/databases/ibm_db.yml b/railties/configs/databases/ibm_db.yml new file mode 100644 index 0000000000..a9716ddb44 --- /dev/null +++ b/railties/configs/databases/ibm_db.yml @@ -0,0 +1,62 @@ +# IBM Dataservers +# +# Home Page +# http://rubyforge.org/projects/rubyibm/ +# +# To install the ibm_db gem: +# On Linux: +# Source the db2profile file and set the necessary environment variables: +# +# . /home/db2inst1/sqllib/db2profile +# export IBM_DB_DIR=/opt/ibm/db2/V9.1 +# export IBM_DB_LIB=/opt/ibm/db2/V9.1/lib32 +# +# Then issue the command: gem install ibm_db +# +# On Windows: +# Issue the command: gem install ibm_db +# If prompted, select the mswin32 option +# +# For more details on the installation refer to http://rubyforge.org/docman/view.php/2361/7682/IBM_DB_GEM.pdf +# +# For more details on the connection parameters below refer to: +# http://rubyibm.rubyforge.org/docs/adapter/0.9.0/rdoc/classes/ActiveRecord/ConnectionAdapters/IBM_DBAdapter.html + +development: + adapter: ibm_db + username: db2inst1 + password: + database: <%= app_name[0,4] %>_dev + #schema: db2inst1 + #host: localhost + #port: 50000 + #account: my_account + #app_user: my_app_user + #application: my_application + #workstation: my_workstation + +test: + adapter: ibm_db + username: db2inst1 + password: + database: <%= app_name[0,4] %>_tst + #schema: db2inst1 + #host: localhost + #port: 50000 + #account: my_account + #app_user: my_app_user + #application: my_application + #workstation: my_workstation + +production: + adapter: ibm_db + username: db2inst1 + password: + database: <%= app_name[0,4] %>_prd + #schema: db2inst1 + #host: localhost + #port: 50000 + #account: my_account + #app_user: my_app_user + #application: my_application + #workstation: my_workstation
\ No newline at end of file diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb index 9849948339..acd3dc8c8c 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -5,7 +5,7 @@ class AppGenerator < Rails::Generator::Base DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']) - DATABASES = %w(mysql oracle postgresql sqlite2 sqlite3 frontbase) + DATABASES = %w(mysql oracle postgresql sqlite2 sqlite3 frontbase ibm_db) DEFAULT_DATABASE = 'sqlite3' default_options :db => (ENV["RAILS_DEFAULT_DATABASE"] || DEFAULT_DATABASE), |