Reputation: 77
I trying to figure out how fix the active record problem so I can push to heroku.
-----> Preparing app for Rails asset pipeline Running: rake assets:precompile rake aborted! ActiveRecord::AdapterNotSpecified: 'postgresql' database is not configured. Available: ["development", "adapter", "encoding", "database", "host", "pool", "username", "password", "production"]
development:
adapter: postgresql
encoding: unicode
database: sample_app_development
host: localhost
pool: 5
username: sample_app
password:
test:
adapter: postgresql
encoding: unicode
database: sample_app_test
host: localhost
pool: 5
username: sample_app
password:
production:
adapter: postgresql
encoding: unicode
database: sample_app_production
host: localhost
pool: 5
username: sample_app
password:
Upvotes: 2
Views: 7278
Reputation: 411
Upvotes: 1
Reputation: 1700
There is a space before development
in the db config. I believe To fix it, simply remove space from the first line and follow the indentation.
Upvotes: 5
Reputation: 3036
I think you need to write this command on terminal to create you database:
rake db:create
Then run rake db:migrate
to run your migrations
Upvotes: 1
Reputation:
First install postgresql
gem install pg
Then create project using following command:
rails new myapp -d postgresql
Upvotes: 0