2016-08-21 48 views
1

我想一個buildpack添加到我的Heroku應用程序,但運行`buildpacks`不是Heroku的命令

heroku buildpacks:set third_party_buildpack 

回報

! `buildpacks:set` is not a heroku command. 
! See `heroku help` for a list of available commands. 

,當我運行

heroku buildpacks 

我得到

! `buildpacks` is not a heroku command. 
! See `heroku help` for a list of available commands. 

即使

heroku help buildpacks 

返回同樣的事情,

heroku help 

回報

Usage: heroku COMMAND [--app APP] [command-specific-options] 

Primary help topics, type "heroku help TOPIC" for more details: 

    addons # manage addon resources 
    apps  # manage apps (create, destroy) 
    auth  # authentication (login, logout) 
    config # manage app config vars 
    domains # manage custom domains 
    logs  # display logs for an app 
    ps  # manage dynos (dynos, workers) 
    releases # manage app releases 
    run  # run one-off commands (console, rake) 
    sharing # manage collaborators on an app 

Additional topics: 

    certs  # manage ssl endpoints for an app 
    drains  # display drains for an app 
    features  # manage optional features 
    fork   # clone an existing app 
    git   # manage git for apps 
    help   # list commands and display help 
    keys   # manage authentication keys 
    labs   # manage optional features 
    maintenance # manage maintenance mode for an app 
    members  # manage membership in organization accounts 
    orgs   # manage organization accounts 
    pg   # 
    pgbackups # manage backups of heroku postgresql databases 
    plugins  # manage plugins to the heroku gem 
    regions  # list available regions 
    stack  # manage the stack for an app 
    status  # check status of heroku platform 
    twofactor # 
    update  # update the heroku client 
    version  # display version 

注意缺少幫助主題buildpacks的。我的英雄版本顯示

heroku-toolbelt/3.25.0 (x86_64-linux) ruby/2.2.4 

Heroku的buildpack頁面聽起來像heroku buildpack:set命令應該是開箱即用的。有誰知道爲什麼這個功能似乎不存在於我的機器上?我的應用程序在Ruby(2.2.4)在rails(4.0.3)上運行Ubuntu 14.04。提前致謝。

回答

1

我昨天有這個問題。事實證明,我有一個漂亮的Heroku CLI版本或安裝了heroku gem。

當您在終端輸入heroku --version時,您會看到什麼?

見下從這裏:https://devcenter.heroku.com/articles/heroku-cli

$ heroku --version 
heroku-toolbelt/3.43.9 (x86_64-darwin10.8.0) ruby/1.9.3 
heroku-cli/5.2.39-010a227 (darwin-amd64) go1.6.2 

你應該看到的Heroku,工具區/ X.Y.Z輸出。如果你不這樣做,但是已經安裝了Heroku CLI,那麼你的系統中可能會有一箇舊的heroku gem - 卸載它。

我跑gem uninstall 'heroku'從這裏跑了安裝程序:https://devcenter.heroku.com/articles/heroku-cli 然後gem install 'heroku'然後buildpack Heroku的命令,開始爲我工作。