heroku db:推动错误的红宝石 [英] heroku db:push taps wrong ruby
问题描述
I am using OSX Mountain Lion and trying to db:push.
我使用OSX Mountain Lion并尝试db:push。 .2p320(2012-04-20修订版35421)[x86_64-darwin12.0.0]
$ bundle exec heroku db:push --confirm古-fall-9918
Loaded Taps v0.3.24
自动检测到的本地数据库:mysql2://root@127.0.0.1/lottery_portal_development?encoding = utf8
警告:应用程序'ancient-falls-9918'中的数据将被覆盖,并且无法恢复。
/Users/psmy/.rvm/gems/ruby-1.9.2-p320@lpr31/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle:[BUG]分段错误
ruby 1.8.7(2012-02-08 patchlevel 358)[universal-darwin12.0]
中止陷阱:6
$ 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
为什么要试用1.8.7?
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 ]
我已经在项目和全球级别上卸载并重新安装了heroku和tap。我已经删除了内置版本的ruby的任何痕迹(我认为)。
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).
推荐答案
因为您尝试使用 bundle exec heroku
。只需使用 heroku
即可解决该问题。
Because you tried using bundle exec heroku
. Use just heroku
instead, that should fix it.
如果您想设置Heroku CLI使用的Ruby到您使用RVM指定的那个,请在此处查看我的答案: https://stackoverflow.com/a/28632883/380607
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
这篇关于heroku db:推动错误的红宝石的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!