LoginSignup
45
45

More than 5 years have passed since last update.

[vagrant 1.5] Vagrant 上の CentOS 6.5 から Heroku を使うには。

Last updated at Posted at 2014-07-26

前置き

MacBook Pro(Mavericks) に Vagrant で CentOS 6.5 の環境を作ります。
そこに Rails 環境を作りました。
で、それらを Heroku に上げたい状況です。

heroku-toolbeltのインストール

Ubuntuだと簡単にできますが、CentOSだと一手間かかります。

証明書を無視する形で、Standaloneのソースを持ってきます。

wget -qO- https://toolbelt.heroku.com/install.sh | sh

パスを通します。

$ echo 'PATH="/usr/local/heroku/bin:$PATH"' >> ~/.zshrc
$ source ~/.zshrc

私の場合はこれでうまくいきました。

確認

$ heroku version
----

heroku-toolbelt/3.9.6 (x86_64-linux) ruby/2.1.1

ここまできたら、

$ heroku login
$ heroku create

などherokuコマンドが動きます。

ただ、うまくいかない場合もある様です。

Rails環境の場合の対応

$ vim Gemfile
----

source 'https://rubygems.org'
gem "heroku-api", "0.3.18" #追記
$ bundle install

こうすると上手くいくこともある様です。

参考

https://toolbelt.heroku.com/
http://m-namiki.hatenablog.jp/entry/2014/03/27/220000

45
45
0

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
45
45