5
5

More than 5 years have passed since last update.

heroku db:pull したら gem がないっていわれた

Posted at
  • heroku-toolbelt/2.39.5 (x86_64-darwin10.8.0) ruby/1.9.3
  • OSX 10.8.4
  • rbenv, homebrew 使用

gem install heroku したらこんなこと言われた。

$ gem install heroku
...
Fetching: heroku-2.39.5.gem (100%)
 !    The `heroku` gem has been deprecated and replaced with the Heroku Toolbelt.
 !    Download and install from: https://toolbelt.heroku.com
 !    For API access, see: https://github.com/heroku/heroku.rb
...

これに従って https://toolbelt.heroku.com から Heroku Toolbelt をインストール。
heroku db:pull したら下記メッセージ。

$ heroku db:pull
 !    Taps Load Error: cannot load such file -- taps/operation
 !    You may need to install or update the taps gem to use db commands.
 !    On most systems this will be:
 !
 !    sudo gem install taps

gem install taps してもだめ。rbenv 使ってるからかな。
heroku コマンドの shebang を調べてみる。

$ head -n 1 `which heroku`
#!/usr/local/heroku/ruby/bin/ruby

/usr/local/heroku/ruby に自前で ruby 持ってるらしい。
たぶん gem コマンドもあるだろうと思ったらやっぱりあったので、改めて taps をインストール。

$ /usr/local/heroku/ruby/bin/gem install taps

その後 heroku db:pull すると今度は sqlite3 がないというのでインストール。

$ /usr/local/heroku/ruby/bin/gem install sqlite3

もっかい試すと pg がないと言うのでインストール。

$ /usr/local/heroku/ruby/bin/gem install pg

これで heroku db:pull できるようになった。

5
5
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5