How can I specify heroku's MIME type?

Viewed 2302

I am trying to play with the postgresql db on heroku which is used by my rails app, but heroku pg returns this error message:

 !    Please specify a version along with Heroku's API MIME type.
 For example, `Accept: application/vnd.heroku+json; version=3`.

What is Heroku's API MIME type? How can I specify the right value?

4 Answers

I have encounter the same problem with yours.
And I have just use the command as follows:

wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh

It's also useless.
Finally I find I forgot configure gem 'pg' in group of production in Gerfile.Just like this.

group :production do
 gem 'pg'
end

and then run

bundle install

The problem will disappear. At this time,no matter what commands such as $heroku login, $heroku --version,$heroku create you input ,there will shows nothing about erorr.



for cloud 9 ide:

The command wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh did not work for me to correct MIME type error. After running the command (without the q so I could see the full output) I noticed the following failure

Failed to fetch http://linux.dropbox.com/ubuntu/dists/precise/main/binary-amd64/Packages 404 Not Found

My solution

  1. from Heroku support site instruction (Other installation methods, Standalone installation), I ran curl https://cli-assets.heroku.com/install.sh | sh (as sudo). It installed into usr/local/lib/Heroku and the app disappeared from c9 !
  2. I copied the Heroku directory from usr/local/lib to usr/lib/ (cp -r usr/loca/lib/Heroku usr/lib ) and voila!
  3. Heroku version now gives heroku/7.19.4 linux-x64 node-v11.3.0. I think it was giving Heroku 3.23 before. Looks to be working but if I run into any problems I will update (using wget command above) from this point. Hope this is of help to someone!
Related