我有一台机器,我的所有 Rails 应用程序都在“暂存”环境中运行,甚至是生产环境。它正在尝试连接到临时数据库。我尝试在以下位置将其设置为生产:
#/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'
我什至试着把它放进去:
#config/environment.rb adding Rails.env = 'production'
我收到以下乘客错误:
staging database is not configured (ActiveRecord::AdapterNotSpecified)
我什至跑了( 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、Passenger 3.0.7、ruby 1.9.2 和 rails 3.0.9
我还能在哪里查找我将环境设置为暂存的位置?
谢谢你的帮助