Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActiveRecord::ConnectionNotEstablished : jdbc adapter requires :driver and :url (got :driver = ) #4300

Closed
sanjaysalunkhe opened this issue Sep 19, 2016 · 1 comment

Comments

@sanjaysalunkhe
Copy link

I am running jruby on rails application and using glassfish server and postgresql database. i have created connection pool in glassfish server and i am able to ping that connection using glassfish admin tool.

Below is my database.yml file.

development:
  adapter: postgresql
  jndi: jdbc/railsdevelopertutorial

production:
  adapter: postgresql
  jndi: jdbc/railsdevelopertutorial

whenever i start my webrick server i am getting below error.

jdbc adapter requires :driver and :url (got :driver = )

what could be the reason for this error.

Below is the bash file which i have used to create connection pool in glassfish server

!/bin/bash

DB=harbinger
DB_USER=railsdevelopertutorial
DB_PASSWORD=2893ourj8923urjl
DB_HOST=localhost
JDBC_POOL=railsdevelopertutorialPOOL
JDBC_RESOURCE=jdbc/railsdevelopertutorial

cd /opt/glassfish4/bin
./asadmin login

if [ $? != 0 ]; then
echo "Must login to continue"
exit
fi

./asadmin create-jdbc-connection-pool
--datasourceclassname=org.postgresql.ds.PGConnectionPoolDataSource
--restype=javax.sql.ConnectionPoolDataSource
--property user=${DB_USER}:password=${DB_PASSWORD}:databaseName=${DB}:serverName=${DB_HOST}
${JDBC_POOL}

./asadmin create-jdbc-resource
--connectionpoolid ${JDBC_POOL}
${JDBC_RESOURCE}

why i am getting ActiveRecord::ConnectionNotEstablished : jdbc adapter requires :driver and :url (got :driver = ) .. please help

@evertonts
Copy link

Please use the mailing list or StackOverflow for questions/help, where a wider community will be able to help you. We reserve the issues tracker for issues only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants