Skip to content

Commit b726208

Browse files
committed
redis for cables
1 parent 95e641a commit b726208

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ gem 'pretender'
3535
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
3636
# gem 'jbuilder', '~> 2.7'
3737
# Use Redis adapter to run Action Cable in production
38-
# gem 'redis', '~> 4.0'
38+
gem 'redis', '~> 4.0'
3939

4040
# Use Capistrano for deployment
4141
# gem 'capistrano-rails', group: :development

Gemfile.lock

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ GEM
262262
execjs
263263
railties (>= 3.2)
264264
tilt
265+
redis (4.6.0)
265266
regexp_parser (2.5.0)
266267
responders (3.0.1)
267268
actionpack (>= 5.0)
@@ -360,6 +361,7 @@ DEPENDENCIES
360361
puma (~> 4.1)
361362
rails (~> 6.1)
362363
react-rails
364+
redis (~> 4.0)
363365
rubocop-rails
364366
rubyzip
365367
spring
@@ -372,4 +374,4 @@ RUBY VERSION
372374
ruby 2.7.5p203
373375

374376
BUNDLED WITH
375-
2.1.4
377+
2.3.6

config/cable.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
# test:
55
# adapter: test
66
#
7-
# production:
8-
# adapter: redis
9-
# url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10-
# channel_prefix: hourglass_production
11-
127
production:
13-
adapter: postgresql
8+
adapter: redis
9+
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10+
channel_prefix: hourglass_production
11+
12+
# production:
13+
# adapter: postgresql
1414

1515
development:
1616
adapter: postgresql

0 commit comments

Comments
 (0)