私のすべてのレールアプリケーションは、ステージング環境で稼働しています。ステージングデータベースに接続しようとしています。私はそれが次の場所での生産に設定されている設定しようとしている:生産現場でステージングを実行中のレール
staging database is not configured (ActiveRecord::AdapterNotSpecified)
I:私はの乗客のエラーを取得しています
#config/environment.rb adding Rails.env = 'production'
:私もそれを入れてみました
#/etc/apache2/mods-enabled/passenger.so:
# the line above was wrong, it is in /etc/apache2/sites-enabled/ier
RailsBaseURI /ier
RailsEnv production
<Directory /rails/production/ier/current/public>
Options -MultiViews
</Directory>
#app/controllers/application_controller.rb
Rails.env = 'production'
(grep -R "staging"。in)を実行して得ました:
Binary file ./.git/index matches
./config/deploy.rb:set :stages, %w(staging production)
./config/deploy.rb:# %w{staging.rb}.each do |config|
./config/deploy.rb:# %w{production.rb staging.rb}.each do |deploy_env|
./config/database.yml:staging:
grep: ./config/deploy/staging.rb: No such file or directory
grep: ./config/deploy/production.rb: No such file or directory
私はApache2の、旅客3.0.7、1.9.2ルビーを、実行していますし、レール3.0.9
は他にどこ私はステージングに環境を設定する場所を見つけるために見ることができますか?任意のヘルプ
どのようにサーバーを実行しようとしていますか?レールs -e生産? – corroded
Apacheの仮想サイトであるため、Apacheが起動すると実行されます。設定には上記の乗客コードが含まれます。仮想サイトのコードの残りの部分を追加して、それをより明確にします。 –