I want to deploy a spree app to heroku and in order to do that I need to precompile my assets locally I did
heroku addons:create heroku-postgresql
then I added config/application.rb
config.assets.initialize_on_precompile = false
my database.yaml file is
default: &default
adapter: postgresql
encoding: unicode
pool: 5
development:
<<: *default
host: localhost
database: anzels_development
username: anzels
password: 1234
test:
<<: *default
host: localhost
database: anzels_test
username: anzels
password: 1234
production:
adapter: postgresql
encoding: unicode
database: anzels_production
pool: 5
password:
and whenever I run
sumeet@sumi-pc:~/anzels$ rake assets:precompile RAILS_ENV=production
I get an error rake aborted!
ActiveRecord::NoDatabaseError: FATAL: role "sumeet" does not exist
/home/sumeet/anzels/config/environment.rb:5:in `<top (required)>'
PG::ConnectionBad: FATAL: role "sumeet" does not exist
/home/sumeet/anzels/config/environment.rb:5:in `<top (required)>'
Tasks: TOP => environment
(See full trace by running task with --trace)
config/enviormenr.rb
# Load the Rails application.
require File.expand_path('../application', __FILE__)
# Initialize the Rails application.
Rails.application.initialize!
please help
config/environment.rb
would be useful. – Levorotation