Jump to content

The ultimate community for Ruby on Rails developers.


Photo

Problems with database adapters

database postgresql pg psql mysql adapter

  • Please log in to reply
2 replies to this topic

#1 sebkomianos

sebkomianos

    Passenger

  • Members
  • 2 posts
  • LocationCorfu or Berlin

Posted 16 August 2013 - 09:50 PM

Hello everyone!

I wasn't planning to have a "problem" as my first post here but I am very stuck at something I haven't experienced before and I am really hoping you might be able to help:

I created a new rails application with postgresql as the default database and I really can't configure it properly.

 

When I type "rails s" everything goes well but when I hit "http://localhost:3000/" at my browser, I get this error:

ActiveRecord::AdapterNotSpecified

database configuration does not specify adapter

My database.yml file looks like this: 

development:
  adapter: postgresql
  encoding: unicode
  database: railsapp_development
  pool: 5
  host: localhost
  username: sebkomianos
  password:

test:
  adapter: postgresql
  encoding: unicode
  database: railsapp_test
  pool: 5
  host: localhost
  username: sebkomianos
  password:

production:
  adapter: postgresql
  encoding: unicode
  database: railsapp_production
  pool: 5
  host: localhost
  username: sebkomianos
  password: 

Furthermore, all these database show up on pgAdmin3.

I spent the past two hours googling, stackoverflowing, etc, etc, to no avail. Anyone with similar troubles here?



#2 sebkomianos

sebkomianos

    Passenger

  • Members
  • 2 posts
  • LocationCorfu or Berlin

Posted 16 August 2013 - 10:17 PM   Best Answer

Funny how going public about your difficulties clears your mind and helps you fix them. I had "dev:" and "railsapp_dev" instead of "development"!

 

(Mods feel free to lock/delete this thread if you think you should - we need an "embarrassed" emoticon by the way :D)



#3 james

james

    Guard

  • Moderators
  • 221 posts
  • LocationLeeds, U.K.

Posted 16 August 2013 - 10:33 PM

I talk to my dog.

 

He's a great listener and understands everything I say. He even agrees with me especially when I have a bone for him ;)


  • Tom and sebkomianos like this

Programming is just about problem solving!






Also tagged with one or more of these keywords: database, postgresql, pg, psql, mysql, adapter

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users