Revert "DEV: Parse and install bundler version from Gemfile.lock (#98)"
This reverts commit 25fc00a763
.
This causes a RuntimeError during upgrade, because the `discourse` user does not have permission to install system gems
```
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/local/lib/ruby/gems/2.7.0 directory.
Docker Manager: FAILED TO UPGRADE
```
This commit is contained in:
parent
25fc00a763
commit
f43a8a08d0
|
@ -90,10 +90,6 @@ class DockerManager::Upgrader
|
|||
percent(20 * (index + 1) / @repos.size)
|
||||
end
|
||||
|
||||
bundler_version = parse_bundler_version
|
||||
raise "Unable to determine bundler version from lockfile" if bundler_version.nil?
|
||||
run("gem install bundler --conservative -v #{bundler_version}")
|
||||
|
||||
run("bundle install --deployment --jobs 4 --without test development")
|
||||
begin
|
||||
run("bundle exec rake plugin:pull_compatible_all")
|
||||
|
@ -243,12 +239,6 @@ class DockerManager::Upgrader
|
|||
|
||||
private
|
||||
|
||||
def parse_bundler_version
|
||||
File.read("Gemfile.lock").lines.each_cons(2).find do |heading, version|
|
||||
return version.strip if heading.strip == "BUNDLED WITH"
|
||||
end
|
||||
end
|
||||
|
||||
def pid_exists?(pid)
|
||||
Process.getpgid(pid)
|
||||
rescue Errno::ESRCH
|
||||
|
|
Loading…
Reference in New Issue