rake db:create 在 Ubuntu 中不工作

rake db:create is not working in Ubuntu

我目前正在 运行 Ubuntu Xenial 16.04.01 上的 rake db:create 命令,但出现以下错误。

Your bundle is locked to activesupport (5.0.0.1), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of activesupport (5.0.0.1) has removed it. You'll need to update your bundle to a different version of activesupport (5.0.0.1) that hasn't been removed in order to install.

我已经尝试运行使用下面的命令来尝试获取新版本的活动支持,但它仍然无法正常工作..

sudo apt-get update
sudo apt-get install ruby-activesupport

如有任何帮助或建议,我们将不胜感激。

sudo apt-get update 与 ruby 宝石无关。

从错误来看,您的 Gemfile.lock 似乎具有 ActiveSupport 的 5.0.0.1 版本,但未在您的 Gemfile.

中声明

您能否尝试在 Gemfile 中添加 gem activesupport,然后从项目文件夹中添加 运行 bundle install?这应该可以解决您的问题。