The error was due to incorrect syntax when the url was specified in the database.yml file. This is the correct way:
development:
adapter: jdbc
driver: com.ibm.db2.jcc.DB2Driver
url: jdbc:db2://localhost:50000/devdb
host: localhost
port: 50000
database: devdb
username: db2inst1
password: mypass