1

I am using OSX Mountain Lion and trying to db:push.

$ ruby -v
ruby 1.9.2p320 (2012-04-20 revision 35421) [x86_64-darwin12.0.0]
$ bundle exec heroku db:push --confirm ancient-falls-9918
Loaded Taps v0.3.24
Auto-detected local database: mysql2://root@127.0.0.1/lottery_portal_development?encoding=utf8
Warning: Data in the app 'ancient-falls-9918' will be overwritten and will not be recoverable.
/Users/psmy/.rvm/gems/ruby-1.9.2-p320@lpr31/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]

Abort trap: 6

Why is it trying to use 1.8.7?

$ rvm list

rvm rubies

ree-1.8.7-2011.03 [ i686 ]
=* ruby-1.9.2-p320 [ x86_64 ]
ruby-1.9.3-p194 [ x86_64 ]

I have uninstalled and reinstalled heroku and taps at both the project and global level. I have removed any traces of the built in version of ruby (I think).

phil
  • 4,668
  • 4
  • 33
  • 51

2 Answers2

0

Disclaimer: This might or might not break stuff. This is what I did to fix the problem for me.

Try this solution.

Uninstall RVM:

rvm implode
sudo rm -r ~/.rvm

Install rbenv

brew update
brew install rbenv
brew install ruby-build
rbenv install 1.9.3-p194
rbenv global 1.9.3-p194

Add this to your ~/.bash_profile or ~/.zshrc

eval "$(rbenv init -)"

Install bundler

sudo gem install bundler

Install gems

bundle install

Re-install the Heroku Toolbelt

Close all terminal windows and re-open them. I did all of that and db:pull is working again.

mike
  • 1,526
  • 3
  • 17
  • 25
0

Because you tried using bundle exec heroku. Use just heroku instead, that should fix it.

If you want to set the Ruby that the Heroku CLI uses to the one that you've specified with RVM, see my answer here: https://stackoverflow.com/a/28632883/380607

Community
  • 1
  • 1
Magne
  • 16,401
  • 10
  • 68
  • 88