bundle exec rake assets:precompile - database configuration does not specify adapter

后端 未结 7 2023
梦毁少年i
梦毁少年i 2020-12-16 18:54

After 24 hours of trying to find the problem with my app. I finally found the problem.

I ran

rake assets:precompile RAILS_ENV=production

7条回答
  •  星月不相逢
    2020-12-16 19:53

    Make sure you have some dummy production entry in your local config/database.yml file

    production:
      <<: *default
      database: your_local_database_name
    

    I've come across the same error in 2016 with Rails 4.2.6 and Capistrano 3.4. We were precompiling the assets during the deploy script just before uploading them together with the code, but rake assets:precompile needs some production entry, even if it's just a dummy one. Source: https://github.com/TalkingQuickly/capistrano-3-rails-template/issues/12

提交回复
热议问题