【问题标题】:Heroku client internal error, undefined method `database_session'Heroku 客户端内部错误,未定义方法“database_session”
【发布时间】:2024-01-10 12:48:02
【问题描述】:

我正在尝试从 Heroku 远程提取数据库,但收到此错误消息。

! Heroku 客户端内部错误。 !寻求帮助:https://help.heroku.com !或报告错误:https://github.com/heroku/heroku/issues/new

Error:       undefined method `database_session' for #<Heroku::Client:0x007fba0d5a2f20> (NoMethodError)
Backtrace:   /Users/christopheprakash/.heroku/plugins/heroku-taps/lib/taps/heroku/command/db.rb:217:in `taps_client'
             /Users/christopheprakash/.heroku/plugins/heroku-taps/lib/taps/heroku/command/db.rb:64:in `pull'
             /Users/christopheprakash/.heroku/client/lib/heroku/command.rb:213:in `run'
             /Users/christopheprakash/.heroku/client/lib/heroku/cli.rb:28:in `start'
             /usr/local/Cellar/heroku-toolbelt/2.40.0/libexec/bin/heroku:24:in `<main>'

Command:     heroku db:pull sqlite://db/development.sqlite3
Plugins:     heroku-taps
Version:     heroku-toolbelt/3.0.0 (x86_64-darwin12.4.0) ruby/1.9.3

我直接从heroku下载了toolbelt,然后通过https://github.com/heroku/heroku-taps.git安装了taps插件

知道如何解决这个问题吗?

谢谢!

编辑:我已经尝试了 Heroku 提供的命令的所有变体,但仍然出现同样的错误!

【问题讨论】:

标签: ruby-on-rails ruby git heroku gem


【解决方案1】:

更改您的 Gemfile

group :development, :test do
  gem 'sqlite3'
end
group :production
  gem 'pg'
end

然后bundle install,重新提交并再次推送到heroku

【讨论】:

  • 对不起,您的问题中没有足够的信息来提供真正的帮助,一般错误就是这样。我们真的不知道您尝试了什么。