【发布时间】:2019-04-23 17:29:31
【问题描述】:
我正在为我的 Rails 应用程序使用 docker-compose。
我最近对我的 master 分支进行了更新,将 rails 版本更新到了 5.2.3 —— 我通过 docker-compose 运行了 bundle install:
docker-compose run web bundle install
看起来它运行良好,但是当我尝试运行 rspec 时出现此错误:
Could not find activesupport-5.2.3 in any of the sources
Run `bundle install` to install missing gems.
我尝试运行bundle update activesupport - 得到这个:
Bundler attempted to update activesupport but its version stayed the same
Bundle updated!
所以我尝试手动安装 gem:
docker-compose run web gem install activesupport
Fetching activesupport-5.2.3.gem
Successfully installed activesupport-5.2.3
1 gem installed
然后我尝试再次运行 rspec,同样的事情:
$ docker-compose run web bin/rspec ./spec/some_spec.rb
Could not find activesupport-5.2.3 in any of the sources
Run `bundle install` to install missing gems.
docker-compose 是否没有注意到 gem/bundle 的变化?我在这里遗漏了什么吗?
【问题讨论】:
-
您可以将您的
Dockerfile和您的docker-compose.yml添加到问题中吗?当你说“run rspec”时,你到底在运行哪个命令? -
你可以在我上面的描述中看到我通过
docker-compose run web bin/rspec ./spec/some_spec.rb运行它
标签: ruby-on-rails docker rspec docker-compose bundler