Skip to content

Commit

Permalink
Try to handle GEM_HOME issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nrobinaubertin committed Oct 19, 2023
1 parent a210dd2 commit 006c8d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
13 changes: 4 additions & 9 deletions discourse_rock/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,11 @@ parts:
override-build: |
cd $CRAFT_STAGE/srv/discourse/app
gem install -n "bin" bundler
bin/bundle install
bin/bundle install --gemfile="plugins/discourse-saml/Gemfile"
bin/bundle install --gemfile="plugins/discourse-prometheus/Gemfile"
GEM_HOME=/usr/lib/ruby/gems/2.7.0 bin/bundle install
GEM_HOME=/usr/lib/ruby/gems/2.7.0 bin/bundle install --gemfile="plugins/discourse-prometheus/Gemfile"
GEM_HOME=/usr/lib/ruby/gems/2.7.0 bin/bundle install --gemfile="plugins/discourse-saml/Gemfile"
organize:
'/var/lib/gems': var/lib/gems
'srv/discourse/plugins/discourse-saml/Gemfile.lock': srv/discourse/app/plugins/discourse-saml/
'srv/discourse/plugins/discourse-prometheus/Gemfile.lock': srv/discourse/app/plugins/discourse-prometheus/
'srv/discourse/plugins/discourse-mermaid/Gemfile.lock': srv/discourse/app/plugins/discourse-mermaid/
'srv/discourse/plugins/discourse-markdown-note/Gemfile.lock': srv/discourse/app/plugins/discourse-markdown-note/
'srv/discourse/plugins/discourse-solved/Gemfile.lock': srv/discourse/app/plugins/discourse-solved/
'/usr/lib/ruby/gems/2.7.0': usr/lib/ruby/gems/2.7.0
'srv/discourse/app/bin/*': srv/discourse/app/bin/
'srv/discourse/app/Rakefile': srv/discourse/app/
'srv/discourse/app/bundle': srv/discourse/app/
Expand Down
3 changes: 2 additions & 1 deletion src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ def _create_discourse_environment_settings(self) -> typing.Dict[str, str]:
"DISCOURSE_SMTP_PASSWORD": self.config["smtp_password"],
"DISCOURSE_SMTP_PORT": str(self.config["smtp_port"]),
"DISCOURSE_SMTP_USER_NAME": self.config["smtp_username"],
"GEM_HOME": "/var/lib/gems/2.7.0",
"GEM_HOME": "/usr/lib/ruby/gems/2.7.0",
"GEM_PATH": "/usr/lib/ruby/gems/2.7.0",
"RAILS_ENV": "production",
}
pod_config.update(self._get_saml_config())
Expand Down

0 comments on commit 006c8d1

Please sign in to comment.