1

I am trying to access my production postgresql database on heroku using the following command from a windows command line:

> heroku pg:psql

However, I am getting the below error. I made sure that net-ssh is included in my gemfile with gem 'net-ssh', '2.9.3.beta1', then I deleted gemfile.lock, and re-deployed. Any help is appreciated!

---> Connecting to DATABASE_URL
C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- dl/import (LoadError)
    from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Users/user/.heroku/client/vendor/gems/net-ssh-2.9.2/lib/net/ssh/authentication/pageant.rb:1:in `<top (required)>'
    from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Users/user/.heroku/client/vendor/gems/net-ssh-2.9.2/lib/net/ssh/authentication/agent/socket.rb:5:in `<top (required)>'
    from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Users/user/.heroku/client/vendor/gems/net-ssh-2.9.2/lib/net/ssh/authentication/agent.rb:22:in `<top (required)>'
    from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Users/user/.heroku/client/vendor/gems/net-ssh-2.9.2/lib/net/ssh/authentication/key_manager.rb:4:in `<top (required)>'
    from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Users/user/.heroku/client/vendor/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:4:in `<top (required)>'
    from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Users/user/.heroku/client/vendor/gems/net-ssh-2.9.2/lib/net/ssh.rb:11:in `<top (required)>'
    from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Users/user/.heroku/client/vendor/gems/net-ssh-gateway-1.2.0/lib/net/ssh/gateway.rb:2:in `<top (required)>'
    from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Users/user/.heroku/client/lib/heroku/helpers/heroku_postgresql.rb:54:in `maybe_tunnel'
    from C:/Users/user/.heroku/client/lib/heroku/command/pg.rb:150:in `psql'
    from C:/Users/user/.heroku/client/lib/heroku/command.rb:212:in `run'
    from C:/Users/user/.heroku/client/lib/heroku/cli.rb:30:in `start'
    from C:/Heroku/bin/heroku:29:in `<main>'
2
  • Can you run any other heroku command? Like heroku run rails c Commented Dec 2, 2015 at 22:38
  • Yes, I am able to... Commented Dec 3, 2015 at 22:48

1 Answer 1

1

I figured it out. It had something to do with a version of Ruby that I installed after I installed the Heroku toolbelt. So I just uninstalled and reinstalled the Heroku toolbelt like so:

  1. Go to Add / Remove Programs and uninstall the Heroku Toolbelt
  2. Install the Heroku Toolbelt from https://toolbelt.heroku.com/
  3. Type in heroku in a command line to install the toolbelt

I hope this helps someone.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.