bundle exec rake db:migrate说运行`bundle install`

时间:2015-10-22 04:18:46

标签: ruby-on-rails ruby installation

bundle install

这完全没问题。但是当我做的时候

bundle exec rake db:migrate

它说

Could not find byebug-6.0.2 in any of the sources
Run `bundle install` to install missing gems.

2 个答案:

答案 0 :(得分:1)

从评论中,我看到你使用了两种不同类型的命令,一种是sudo,另一种是没有。

问题是:sudo是另一个用户(root用户),因此sudo安装的内容可能不适用于其他用户,反之亦然。

我能想到的解决方案是使用所有sudo命令,因为您当前的用户似乎无法访问PG。

sudo bundle install
sudo bundle exec rake db:migrate

答案 1 :(得分:0)

I just troubleshat this same problem. I finally tried removing byebug and was offered a choice of byebug_6.0.2 or byebug_8.1.0. Removing the earlier version didn’t do it so I removed the other as well. I then reinstalled using

gem install byebug

That gave me another failed migrate, this time blaming debug_inspector. I ran

gem install debug_inspector

After that I was able to run rake db:migrate as expected.