奇怪的是:bundler 正在暂存,而 rails 应用程序正在开发中。
在本地开发中工作并调用“bundle exec rake db:migrate”时,bundler 在暂存而不是开发中运行。
今天在进行新迁移时首次发现问题: bundle exec rake db:migrate
Bundler 无法连接到数据库,直到我修改了 database.yml,将暂存数据库更改为与开发数据库相同。
这个应用程序已经三个月了,并且一直在工作。今天才开始。
正在开发中的 Rails 应用程序
导轨
=> Booting Thin
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
在启动服务器时从 newrelic_agent.log:rails s
[08/25/13 17:20:51 (1648)] INFO : Starting the New Relic agent in "development" environment.
[08/25/13 17:20:51 (1648)] INFO : To prevent agent startup add a NEWRELIC_ENABLE=false environment variable or modify the "development" section of your newrelic.yml.
[08/25/13 17:20:51 (1648)] INFO : Reading configuration from config/newrelic.yml
[08/25/13 17:20:51 (1648)] INFO : Environment: development
[08/25/13 17:20:51 (1648)] INFO : Dispatcher: thin
[08/25/13 17:20:51 (1648)] INFO : Application: Launch More (Development)
[08/25/13 17:20:51 (1648)] WARN : Agent configured not to send data in this environment.
[08/25/13 17:20:51 (1648)] INFO : Installing DelayedJob instrumentation hooks
[08/25/13 17:20:51 (1648)] INFO : Installing ActiveRecord instrumentation
[08/25/13 17:20:51 (1648)] INFO : Installing DelayedJob instrumentation
[08/25/13 17:20:51 (1648)] INFO : Installing Dalli Memcache instrumentation
[08/25/13 17:20:51 (1648)] INFO : Installing Net instrumentation
[08/25/13 17:20:51 (1648)] INFO : Installing Sinatra instrumentation
[08/25/13 17:20:51 (1648)] INFO : Installing Rails 3 Controller instrumentation
[08/25/13 17:20:51 (1648)] INFO : Installing Rails 3.1/3.2 view instrumentation
[08/25/13 17:20:51 (1648)] INFO : Installing Rails3 Error instrumentation
[08/25/13 17:20:51 (1648)] INFO : Finished instrumentation
[08/25/13 17:20:51 (1648)] INFO : NewRelic::Agent::Samplers::DelayedJobSampler sampler not available: No DJ worker present
[08/25/13 17:20:53 (1648)] INFO : Starting the New Relic agent in "development" environment.
[08/25/13 17:20:53 (1648)] INFO : To prevent agent startup add a NEWRELIC_ENABLE=false environment variable or modify the "development" section of your newrelic.yml.
[08/25/13 17:20:53 (1648)] INFO : Reading configuration from config/newrelic.yml
从 newrelic_agent.log 调用:bundle exec rake db:migrate
[08/25/13 17:23:05 (1659)] INFO : Starting the New Relic agent in "staging" environment.
[08/25/13 17:23:05 (1659)] INFO : To prevent agent startup add a NEWRELIC_ENABLE=false environment variable or modify the "staging" section of your newrelic.yml.
[08/25/13 17:23:05 (1659)] INFO : Reading configuration from config/newrelic.yml
[08/25/13 17:23:05 (1659)] WARN : Agent is configured not to use SSL when communicating with New Relic's servers
[08/25/13 17:23:05 (1659)] INFO : Environment: staging
[08/25/13 17:23:05 (1659)] INFO : Dispatcher: thin
[08/25/13 17:23:05 (1659)] INFO : Application: Launch More (Staging)
[08/25/13 17:23:05 (1659)] INFO : Installing DelayedJob instrumentation hooks
[08/25/13 17:23:05 (1659)] INFO : Installing ActiveRecord instrumentation
[08/25/13 17:23:05 (1659)] INFO : Installing DelayedJob instrumentation
[08/25/13 17:23:05 (1659)] INFO : Installing Dalli Memcache instrumentation
[08/25/13 17:23:05 (1659)] INFO : Installing Net instrumentation
[08/25/13 17:23:05 (1659)] INFO : Installing Sinatra instrumentation
[08/25/13 17:23:05 (1659)] INFO : Installing Rails 3 Controller instrumentation
[08/25/13 17:23:05 (1659)] INFO : Installing Rails 3.1/3.2 view instrumentation
[08/25/13 17:23:05 (1659)] INFO : Installing Rails3 Error instrumentation
[08/25/13 17:23:05 (1659)] INFO : Finished instrumentation
[08/25/13 17:23:05 (1659)] INFO : NewRelic::Agent::Samplers::DelayedJobSampler sampler not available: No DJ worker present
[08/25/13 17:23:06 (1659)] INFO : Starting the New Relic agent in "staging" environment.
[08/25/13 17:23:07 (1659)] INFO : To prevent agent startup add a NEWRELIC_ENABLE=false environment variable or modify the "staging" section of your newrelic.yml.
[08/25/13 17:23:07 (1659)] INFO : Reading configuration from config/newrelic.yml
关于为什么的任何想法?
如何解决这个问题?
谢谢,马克
~~~~~~~~~~~~~~~~~~~~~~~~~
ruby 1.9.3p202(2012-04-27 修订版 35484)[x86_64-darwin10.8.0]