这是我的堆栈信息:堆栈:bamboo-mri-1.9.2
当我尝试通过以下命令访问 heroku 控制台时:
heroku run -a pakrat script/rails console
(pakrat 是我的应用程序名称)
我收到以下错误:/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:1032:in initialize': could not translate host name "ec2-107-22-169-50.compute-1.amazonaws.com" to address: Name or service not known (PGError)
from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:1032:in
new' 来自 /app/.bundle/ gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:1032:in connect'
from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:301:in
initialize'来自/app/.bundle/gems/ruby/1.9.1/gems/activerecord- 3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in new'
from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in
postgresql_connection' 来自 /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/ connection_pool.rb:304:in new_connection'
from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:323:in
checkout_new_connection' 来自 /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:inblock (2 levels) in checkout'
from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:261:in
循环'来自 /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:261:in block in checkout'
from /usr/ruby1.9.2/lib/ruby/1.9.1/monitor.rb:201:in
mon_synchronize' 来自 /app/.bundle/gems /ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:260:in checkout'
from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:162:in
connection' 来自 /app/.bundle/gems/ruby/1.9.1/gems/activerecord -3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:409:in retrieve_connection'
from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:107:in
retrieve_connection' 来自 /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters /abstract/connection_specification.rb:89:in connection'
from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/base.rb:703:in
table_exists?来自 /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/base.rb:798:inattribute_names'
from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/params_wrapper.rb:168:in
_set_wrapper_defaults' 来自 /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/params_wrapper.rb:128:in inherited'
from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/abstract_controller/railties/routes_helpers.rb:7:in
block (2 levels) in with' from /app/ .bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/railties/paths.rb:7:in block (2 levels) in with'
from /app/app/controllers/authentications_controller.rb:1:in
'来自/app/.bundle/gems/ruby/1.9.1/gems/ activesupport-3.1.1/lib/active_support/dependencies.rb:240:in require'
from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in
block in require' 来自 /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies。 rb:225:in load_dependency'
from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in
require' 来自require_or_load'
from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:302:in
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:348:independ_on' 来自 /app/.bundle/ gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:214:inrequire_dependency'
from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:417:in
在 eager_load 中阻止(2 个级别)!来自 /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:416:ineach'
from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:416:in
块中的 eager_load!来自 /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:414:in each'
from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:414:in
eager_load!来自 /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/application/finisher.rb:51:in block in <module:Finisher>'
from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:30:in
instance_exec' 来自 /app/.bundle/gems/ruby/1.9 .1/gems/railties-3.1.1/lib/rails/initializable.rb:30:in run'
from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:55:in
block in run_initializers' from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib /rails/initializable.rb:54:in each'
from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:54:in
run_initializers' 来自 /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/application.rb:96:in initialize!'
from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in
method_missing' 来自 / app/config/environment.rb:5:in<top (required)>'
from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in
需要'来自 /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in block in require'
from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in
block in load_dependency' 来自 /app/.bundle/gems/ruby /1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in new_constants_in'
from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in
load_dependency' 来自 /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib /active_support/dependencies.rb:240:in require'
from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/application.rb:83:in
require_environment!' 来自 /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/commands.rb:39:in<top (required)>'
from script/rails:6:in
来自 script/rails:6:in `'