Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

wrong argument type Hash (expected Data) (TypeError) when setting ENV vars #1131

Open
ambshar opened this Issue · 3 comments

3 participants

@ambshar

I have successfully deployed my app to heroku. However, I am getting the following error when setting up the ENV values -->>
heroku config:add GMAIL_USERNAME=ambshar@gmail.com

I am using a vagrant virtual box with ubuntu 10.04.4
ruby 2.0.0p451
rails 4.0.1
heroku-toolbelt 3.8.4

Setting config vars and restarting damp-forest-1123... failed
 !    Heroku client internal error.
 !    Search for help at: https://help.heroku.com
 !    Or report a bug at: https://github.com/heroku/heroku/issues/new

    Error:       wrong argument type Hash (expected Data) (TypeError)
    Backtrace:   /usr/local/heroku/vendor/gems/multi_json-1.10.1/lib/multi_json/adapt
ers/json_common.rb:21:in `to_json'
                 /usr/local/heroku/vendor/gems/multi_json-1.10.1/lib/multi_json/adapt
ers/json_common.rb:21:in `dump'
                 /usr/local/heroku/vendor/gems/multi_json-1.10.1/lib/multi_json/adapt
er.rb:24:in `dump'
                 /usr/local/heroku/vendor/gems/multi_json-1.10.1/lib/multi_json.rb:13
6:in `dump'
                 /usr/local/heroku/vendor/gems/heroku-api-0.3.18/lib/heroku/api/confi
g_vars.rb:25:in `put_config_vars'
                 /usr/local/heroku/lib/heroku/command/config.rb:69:in `block in set'
                 /usr/local/heroku/lib/heroku/helpers.rb:227:in `action'
                 /usr/local/heroku/lib/heroku/command/config.rb:68:in `set'
                 /usr/local/heroku/lib/heroku/command.rb:218:in `run'
                 /usr/local/heroku/lib/heroku/cli.rb:37:in `start'
                 /usr/bin/heroku:25:in `<main>'

    Command:     heroku config:add GMAIL_USERNAME=ambshar@gmail.com
    Version:     heroku-toolbelt/3.8.4 (i486-linux) ruby/1.9.1
@pedro
Owner

Damn! We have problems with this json_common adapter for MultiJson, but not idea why it's picking that. What do you have in gem list? Can you try running sudo gem install oj?

@ambshar

Installed the gem oj... but still getting the same error

Here is the gem list

*** LOCAL GEMS ***

actionmailer (4.0.1)
actionpack (4.0.1)
activemodel (4.0.1)
activerecord (4.0.1)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.1)
addressable (2.3.6)
arel (4.0.1)
atomic (1.1.14)
bcrypt (3.1.7)
bcrypt-ruby (3.1.5, 3.0.1)
better_errors (1.0.1)
bigdecimal (1.2.0)
binding_of_caller (0.7.2)
bootstrap-sass (3.1.1.0, 3.0.2.1)
bootstrap_form (2.0.1)
builder (3.1.4)
bundler (1.5.3)
capybara (2.3.0)
coderay (1.1.0)
coffee-rails (4.0.1)
coffee-script (2.2.0)
coffee-script-source (1.6.3)
daemons (1.1.9)
debug_inspector (0.0.2)
diff-lcs (1.2.5)
erubis (2.7.0)
eventmachine (1.0.0)
excon (0.37.0)
execjs (2.0.2)
fabrication (2.9.8)
faker (1.2.0)
figaro (0.7.0)
haml (4.0.4)
haml-rails (0.4)
hike (1.2.3)
i18n (0.6.5)
io-console (0.4.2)
jquery-rails (3.0.4)
json (1.8.1, 1.7.7)
launchy (2.4.2)
letter_opener (1.2.0)
libv8 (3.16.14.3)
mail (2.5.4)
method_source (0.8.2)
mime-types (1.25)
mini_portile (0.6.0)
minitest (4.7.5, 4.3.2)
multi_json (1.8.2)
netrc (0.7.7)
nokogiri (1.6.2.1)
oj (2.9.7)
polyglot (0.3.3)
pry (0.9.12.3)
pry-nav (0.2.3)
psych (2.0.0)
rack (1.5.2)
rack-test (0.6.2)
rails (4.0.1)
railties (4.0.1)
rake (10.1.0, 0.9.6)
rdoc (4.0.0)
ref (1.0.5)
rest-client (1.6.7)
rspec-collection_matchers (0.0.3)
rspec-core (3.0.0.beta2)
rspec-expectations (3.0.0.beta2)
rspec-mocks (3.0.0.beta2)
rspec-rails (3.0.0.beta2)
rspec-support (3.0.0.beta2)
rubyzip (1.1.4)
sass (3.2.12)
sass-rails (4.0.1)
shoulda-matchers (2.5.0)
slop (3.4.7)
sprockets (2.10.0)
sprockets-rails (2.0.1)
sqlite3 (1.3.8)
test-unit (2.0.0.0)
therubyracer (0.12.1)
thin (1.5.0)
thor (0.18.1)
thread_safe (0.1.3)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (0.3.38)
uglifier (2.3.1)
xpath (2.0.0)
@ajsharma

I am seeing this same error when running heroku pg:promote...

Promoting HEROKU_POSTGRESQL_ONYX_URL to DATABASE_URL... failed
 !    Heroku client internal error.
 !    Search for help at: https://help.heroku.com
 !    Or report a bug at: https://github.com/heroku/heroku/issues/new

    Error:       wrong argument type Hash (expected Data) (TypeError)
    Backtrace:   /usr/local/heroku/vendor/gems/multi_json-1.10.1/lib/multi_json/adapters/json_common.rb:21:in `to_json'
                 /usr/local/heroku/vendor/gems/multi_json-1.10.1/lib/multi_json/adapters/json_common.rb:21:in `dump'
                 /usr/local/heroku/vendor/gems/multi_json-1.10.1/lib/multi_json/adapter.rb:24:in `dump'
                 /usr/local/heroku/vendor/gems/multi_json-1.10.1/lib/multi_json.rb:136:in `dump'
                 /usr/local/heroku/vendor/gems/heroku-api-0.3.18/lib/heroku/api/config_vars.rb:25:in `put_config_vars'
                 /usr/local/heroku/lib/heroku/helpers/heroku_postgresql.rb:214:in `hpg_promote'
                 /usr/local/heroku/lib/heroku/command/pg.rb:64:in `block in promote'
                 /usr/local/heroku/lib/heroku/helpers.rb:227:in `action'
                 /usr/local/heroku/lib/heroku/command/pg.rb:63:in `promote'
                 /usr/local/heroku/lib/heroku/command.rb:218:in `run'
                 /usr/local/heroku/lib/heroku/cli.rb:37:in `start'
                 /usr/bin/heroku:25:in `<main>'

    Command:     heroku pg:promote HEROKU_POSTGRESQL_ONYX_URL -a my-app-staging
    Plugins:     heroku-accounts
    Version:     heroku-toolbelt/3.8.4 (x86_64-linux) ruby/1.9.1

I have a similar set up with:
Vagrant Ubuntu 10.04
Rails 4.0.5
ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-linux]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.