bkulyk / iseries_on_rails

Gem to make developing rails apps easier when working with DB2 on the ISeries/AS400
0 stars 2 forks source link

Active Record Connection Example #1

Open wstaples opened 11 years ago

wstaples commented 11 years ago

Can someone give me an example active record connection?

ActiveRecord::Base.establish_connection( :adapter=> "what goes here??", :host => "AS400_name_or_ip", :database=> "what goes here?", :username => "username", :password => "password" )

bkulyk commented 11 years ago

Here is what my rails db config looks like:

development:
  adapter: jdbc
  driver: com.ibm.as400.access.AS400JDBCDriver
  url: jdbc:as400://192.168.1.45/default_library
  username: mydbuser
  password: somepassword
bkulyk commented 11 years ago

Also please note that you will need a copy of jt400.jar to be added to the class path of your project.