私のアプリケーションはlocalhost:3000のローカル環境で正常に動作しています。ローカルのPostgres DBからデータを取得していますが、本番環境を更新しているようには見えません。私のウェルカムページは私のhttps://gcl.herokuapp.comページで見ることができますが、別のページを表示するためにnavリンクをクリックするとエラーが発生します。そのページはdbのデータを呼び出します。ローカルpostrgesは動作しますが、RAILS_ENV = production herokuにプッシュしているようには見えません
私は、ターミナルで次の出力を得る$ rails db:migrate RAILS_ENV=production
をやってる:
:私のdatabase.ymlのように見える(0.2ms) SELECT pg_try_advisory_lock(3666737882978712990);
ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".*
FROM "schema_migrations"
ActiveRecord::InternalMetadata Load (0.6ms) SELECT
"ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", :environment], ["LIMIT", 1]]
(0.2ms) BEGIN
SQL (1.9ms) UPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3 [["value", "production"], ["updated_at", 2017-03-31 10:42:57 UTC], ["key", "environment"]]
(0.4ms) COMMIT
(0.2ms) SELECT pg_advisory_unlock(3666737882978712990)
私は私のGemfile
で宝石 'PG' を持っています
default: &default
adapter: postgresql
pool: 5
timeout: 5000
development:
adapter: postgresql
database: postgresql-rectangular-42683
pool: 5
timeout: 5000
test:
adapter: postgresql
database: postgresql-rectangular-42683
pool: 5
timeout: 5000
production:
adapter: postgresql
database: postgresql-rectangular-42683
username: Simon
password: *************
pool: 5
timeout: 5000`
どのような考えですか?今日程度:(
サイモンのためにいろいろなことをしようとして