Home How to check the heroku database version from ruby
Reply: 0

How to check the heroku database version from ruby

user1417
1#
user1417 Published in August 15, 2018, 5:37 am

I want to check the version of my production database from a shell method running on my local MacOS development machine. From the command line, I can successfully run

heroku run rake db:version --remote production

but if I open a rails console session and type in

hv = `heroku run rake db:version --remote production`

I see the following error message:

/Users/Chris/.rvm/gems/ruby-2.5.1@golf_mentor_5.0.7/gems/bundler-1.16.1/lib/bundler/definition.rb:489:in `validate_ruby!': Your Ruby version is 1.9.3, but your Gemfile specified 2.5.1 (Bundler::RubyVersionMismatch)
    from /Users/Chris/.rvm/gems/ruby-2.5.1@golf_mentor_5.0.7/gems/bundler-1.16.1/lib/bundler/definition.rb:464:in `validate_runtime!'
    from /Users/Chris/.rvm/gems/ruby-2.5.1@golf_mentor_5.0.7/gems/bundler-1.16.1/lib/bundler.rb:101:in `setup'
    from /Users/Chris/.rvm/gems/ruby-2.5.1@golf_mentor_5.0.7/gems/bundler-1.16.1/lib/bundler/setup.rb:20:in `<top (required)>'
    from /usr/local/heroku/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/heroku/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require

I am using ruby 2.5.1. The heroku --version command yields heroku-cli/6.16.13-dbb9c23 (darwin-x64) node-v9.11.1. How do I fix this?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.300092 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO