2017-11-04 16 views
2

조치 케이블을 사용중인 프로덕션으로 내 애플리케이션을 푸시하려고합니다.조치 'pubsub adapter'에 대해 'redis'가 지정되었지만 보석이로드되지 않았습니다.

ERROR -- Specified 'redis' for Action Cable pubsub adapter, but the gem is not loaded. Add `gem 'redis'` to your Gemfile (and ensure its version is at the minimum required by Action Cable).: nil 

내 보석 파일은 같은 것입니다 : 내가 밀어 때마다 말을 나에게 오류를 제공

group :development do 
# Access an IRB console on exception pages or by using <%= console %> in views 
gem 'web-console', '~> 3.0' 
gem 'listen', '~> 3.0.5' 
gem 'spring' 
gem 'spring-watcher-listen', '~> 2.0.0' 
gem 'em-hiredis' 
gem 'redis', '~> 3.0' 
end 

을 내 Cable.yml 같은 것입니다 :

production: 
    adapter: redis 
    url: redis://localhost:6379/1 

development: 
    adapter: async 

test: 
    adapter: async 

어떻게 수정해야 그것을 개발하고 내 행동 케이블 개발 작업을합니다.

Gemlock 전체 : 이 보석의 파일이며, 나는 두 개의 분리 된 문제를 참조

GEM 
    remote: https://rubygems.org/ 
    specs: 
     actioncable (5.0.6) 
     actionpack (= 5.0.6) 
     nio4r (>= 1.2, < 3.0) 
     websocket-driver (~> 0.6.1) 
     actionmailer (5.0.6) 
     actionpack (= 5.0.6) 
     actionview (= 5.0.6) 
     activejob (= 5.0.6) 
     mail (~> 2.5, >= 2.5.4) 
     rails-dom-testing (~> 2.0) 
     actionpack (5.0.6) 
     actionview (= 5.0.6) 
     activesupport (= 5.0.6) 
     rack (~> 2.0) 
     rack-test (~> 0.6.3) 
     rails-dom-testing (~> 2.0) 
     rails-html-sanitizer (~> 1.0, >= 1.0.2) 
     actionview (5.0.6) 
     activesupport (= 5.0.6) 
     builder (~> 3.1) 
     erubis (~> 2.7.0) 
     rails-dom-testing (~> 2.0) 
     rails-html-sanitizer (~> 1.0, >= 1.0.3) 
     activejob (5.0.6) 
     activesupport (= 5.0.6) 
     globalid (>= 0.3.6) 
     activemodel (5.0.6) 
     activesupport (= 5.0.6) 
     activerecord (5.0.6) 
     activemodel (= 5.0.6) 
     activesupport (= 5.0.6) 
     arel (~> 7.0) 
     activesupport (5.0.6) 
     concurrent-ruby (~> 1.0, >= 1.0.2) 
     i18n (~> 0.7) 
     minitest (~> 5.1) 
     tzinfo (~> 1.1) 
     arel (7.1.4) 
     bcrypt (3.1.11) 
     bindex (0.5.0) 
     builder (3.2.3) 
     byebug (9.1.0) 
     coderay (1.1.2) 
     coffee-rails (4.1.1) 
     coffee-script (>= 2.2.0) 
     railties (>= 4.0.0, < 5.1.x) 
     coffee-script (2.4.1) 
     coffee-script-source 
     execjs 
     coffee-script-source (1.12.2) 
     concurrent-ruby (1.0.5) 
     crass (1.0.2) 
     devise (4.3.0) 
     bcrypt (~> 3.0) 
     orm_adapter (~> 0.1) 
     railties (>= 4.1.0, < 5.2) 
     responders 
     warden (~> 1.2.3) 
     em-hiredis (0.3.1) 
     eventmachine (~> 1.0) 
     hiredis (~> 0.6.0) 
     erubis (2.7.0) 
     eventmachine (1.2.5) 
     execjs (2.7.0) 
     ffi (1.9.18) 
     globalid (0.4.1) 
     activesupport (>= 4.2.0) 
     hiredis (0.6.1) 
     i18n (0.9.1) 
     concurrent-ruby (~> 1.0) 
     jbuilder (2.7.0) 
     activesupport (>= 4.2.0) 
     multi_json (>= 1.2) 
     jquery-rails (4.3.1) 
     rails-dom-testing (>= 1, < 3) 
     railties (>= 4.2.0) 
     thor (>= 0.14, < 2.0) 
     listen (3.0.8) 
     rb-fsevent (~> 0.9, >= 0.9.4) 
     rb-inotify (~> 0.9, >= 0.9.7) 
     loofah (2.1.1) 
     crass (~> 1.0.2) 
     nokogiri (>= 1.5.9) 
     mail (2.7.0) 
     mini_mime (>= 0.1.1) 
     method_source (0.9.0) 
     mini_mime (0.1.4) 
     mini_portile2 (2.3.0) 
     minitest (5.10.3) 
     multi_json (1.12.2) 
     nio4r (2.1.0) 
     nokogiri (1.8.1) 
     mini_portile2 (~> 2.3.0) 
     orm_adapter (0.5.0) 
     pg (0.21.0) 
     pry (0.11.2) 
     coderay (~> 1.1.0) 
     method_source (~> 0.9.0) 
     pry-byebug (3.5.0) 
     byebug (~> 9.1) 
     pry (~> 0.10) 
     puma (3.10.0) 
     rack (2.0.3) 
     rack-test (0.6.3) 
     rack (>= 1.0) 
     rails (5.0.6) 
     actioncable (= 5.0.6) 
     actionmailer (= 5.0.6) 
     actionpack (= 5.0.6) 
     actionview (= 5.0.6) 
     activejob (= 5.0.6) 
     activemodel (= 5.0.6) 
     activerecord (= 5.0.6) 
     activesupport (= 5.0.6) 
     bundler (>= 1.3.0) 
     railties (= 5.0.6) 
     sprockets-rails (>= 2.0.0) 
     rails-dom-testing (2.0.3) 
     activesupport (>= 4.2.0) 
     nokogiri (>= 1.6) 
     rails-html-sanitizer (1.0.3) 
     loofah (~> 2.0) 
     railties (5.0.6) 
     actionpack (= 5.0.6) 
     activesupport (= 5.0.6) 
     method_source 
     rake (>= 0.8.7) 
     thor (>= 0.18.1, < 2.0) 
     rake (12.2.1) 
     rb-fsevent (0.10.2) 
     rb-inotify (0.9.10) 
     ffi (>= 0.5.0, < 2) 
     redis (3.3.5) 
     responders (2.4.0) 
     actionpack (>= 4.2.0, < 5.3) 
     railties (>= 4.2.0, < 5.3) 
     sass (3.5.3) 
     sass-listen (~> 4.0.0) 
     sass-listen (4.0.0) 
     rb-fsevent (~> 0.9, >= 0.9.4) 
     rb-inotify (~> 0.9, >= 0.9.7) 
     sass-rails (5.0.6) 
     railties (>= 4.0.0, < 6) 
     sass (~> 3.1) 
     sprockets (>= 2.8, < 4.0) 
     sprockets-rails (>= 2.0, < 4.0) 
     tilt (>= 1.1, < 3) 
     semantic-ui-sass (2.2.12.0) 
     sass (>= 3.2) 
     slim (3.0.8) 
     temple (>= 0.7.6, < 0.9) 
     tilt (>= 1.3.3, < 2.1) 
     slim-rails (3.1.3) 
     actionpack (>= 3.1) 
     railties (>= 3.1) 
     slim (~> 3.0) 
     spring (2.0.2) 
     activesupport (>= 4.2) 
     spring-watcher-listen (2.0.1) 
     listen (>= 2.7, < 4.0) 
     spring (>= 1.2, < 3.0) 
     sprockets (3.7.1) 
     concurrent-ruby (~> 1.0) 
     rack (> 1, < 3) 
     sprockets-rails (3.2.1) 
     actionpack (>= 4.0) 
     activesupport (>= 4.0) 
     sprockets (>= 3.0.0) 
     temple (0.8.0) 
     thor (0.20.0) 
     thread_safe (0.3.6) 
     tilt (2.0.8) 
     turbolinks (5.0.1) 
     turbolinks-source (~> 5) 
     turbolinks-source (5.0.3) 
     tzinfo (1.2.4) 
     thread_safe (~> 0.1) 
     uglifier (3.2.0) 
     execjs (>= 0.3.0, < 3) 
     warden (1.2.7) 
     rack (>= 1.0) 
     web-console (3.5.1) 
     actionview (>= 5.0) 
     activemodel (>= 5.0) 
     bindex (>= 0.4.0) 
     railties (>= 5.0) 
     websocket-driver (0.6.5) 
     websocket-extensions (>= 0.1.0) 
     websocket-extensions (0.1.2) 

    PLATFORMS 
    ruby 

    DEPENDENCIES 
    byebug 
    coffee-rails (~> 4.1.0) 
    devise 
    em-hiredis 
    jbuilder (~> 2.0) 
    jquery-rails 
    listen (~> 3.0.5) 
    pg 
    pry-byebug 
    puma 
    rails (>= 5.0.0.beta3, < 5.1) 
    redis (~> 3.0) 
    sass-rails (~> 5.0) 
    semantic-ui-sass 
    slim-rails 
    spring 
    spring-watcher-listen (~> 2.0.0) 
    turbolinks (~> 5.x) 
    tzinfo-data 
    uglifier (>= 1.3.0) 
    web-console (~> 3.0) 

    BUNDLED WITH 
    1.16.0 
+0

프로젝트에 지정된 다른 버전의 gem 파일이 있습니까? Gemfile 및 Gemfile.lock의 전체 파일에 무엇이 있습니까? –

+0

@ SebastiánPalma 전체 보석 및 보석을 원하십니까? –

+0

@ SebastiánPalma redis를위한 보석의 다른 버전? 난 단지 개발 중에 식별 된 redits gem을 가지고있다. –

답변

0

redis (~> 3.0)로 레디 스 지정됩니다 : 당신의 gemfile에서

  1. 당신 만의 레디 스 보석을 지정됩니다 개발 환경. 라인 gem 'redis', '~> 3.0'을 가지고 group :development 블록 바깥에 놓으십시오. 그렇게하면 생산 보석에 포함됩니다.

  2. redis URL이 프로덕션을 위해 localhost를 가리키고 있습니다. 그게 작동하지 않습니다, 당신은 원격으로 사용할 수있는 redis URL을 가리 키도록해야합니다. Heroku를 사용하는 경우 redis add-on을 사용할 수 있습니다.

0

나는 동일한 문제가있었습니다. 내 보석 (bundle update)을 업데이트하여 해결했습니다. 어떤 보석 정확히 그것을 해결하지.

이제 나는 : ruby 2.5.0, rails 5.1.5, redis 4.0.1, actioncable 5.1.5이 있습니다.