Error loading the 'sqlite3' Active Record adapter. when I deploy in Heroku

后端 未结 5 1147
小鲜肉
小鲜肉 2021-01-26 03:55

I have a problem when I am deploying in Heroku:

/app/vendor/bundle/ruby/2.6.0/gems/bundler-1.17.3/lib/bundler/rubygems_integration.rb:408:in `block (2 levels) in         


        
5条回答
  •  日久生厌
    2021-01-26 04:31

    I had a similar problem and changing the adapter only in production worked for me, so database.yml is like:

    default: &default
      adapter: sqlite3
      pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
      timeout: 5000
    
    development:
      <<: *default
      database: db/development.sqlite3
    
    test:
      <<: *default
      database: db/test.sqlite3
    
    production:
      <<: *default
      adapter: postgresql
      database: db/production.sqlite3
    

    Hope it works for somebody else.

提交回复
热议问题