Skip to content

Commit 7f253c3

Browse files
authored
FIX: Unset RAILS_ENV to allow running both dev stuff and test (#629)
Trying to run specs with RAILS_ENV=development ends up like: ``` /usr/local/lib/ruby/gems/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30: warning: ⛔️ WARNING: Sidekiq testing API enabled, but this is not the test environment. Your jobs will not go to Redis. Randomized with seed 1716 FF Failures: 1) CategoryBadge escapes HTML in category names / descriptions Failure/Error: DB.test_transaction = ActiveRecord::Base.connection.current_transaction NoMethodError: undefined method `test_transaction=' for #<MiniSqlMultisiteConnection:0x000055a7662ea1e0> # ./spec/rails_helper.rb:284:in `block (2 levels) in <top (required)>' # ./spec/rails_helper.rb:277:in `block (2 levels) in <top (required)>' ```
1 parent 241a42c commit 7f253c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

image/discourse_dev/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# NAME: discourse/discourse_dev
22
# VERSION: release
33
FROM discourse/base:release
4-
ENV RAILS_ENV development
4+
5+
# Unset RAILS_ENV to allow running both dev stuff and tests
6+
ENV RAILS_ENV=
57

68
#LABEL maintainer="Sam Saffron \"https://twitter.com/samsaffron\""
79

0 commit comments

Comments
 (0)