« [Ruby] Rails の render | トップページ | [Ruby][Rails] ActionCable in Agile Web Development with Rails 5 »

2016年7月17日 (日)

[Ruby][Rails] ActionCable in Agile Web Development with Rails 5

Agile Web Development with Rails 5 には、ActionCable を使う例が登場するのだけど、これが動作しない。


Subscription class not found: "ProductsChannel"

写経している自分のコードが間違っているのかと思い、書籍のページからダウンロードしたソースを試してみたが、やっぱり同じエラー。
Vagrant 環境で試しているせいかと思って、ローカル環境で試してみても同じエラー。
errata を見てみたら、同じ現象が既に報告されていたので、自分の環境固有の問題ではなさそう。


ところで、ActionCable のサンプルをWebで眺めていると大概、redis をインストールしているのだが、この本ではインストールしていないし、config/cable.yml には


development:
adapter: async

となっていて、redis を使うようになっていない。開発環境では、redis がなくても、ActionCableが動作するのだろうか?


... githubを読むとどうもそうらしい。

|

« [Ruby] Rails の render | トップページ | [Ruby][Rails] ActionCable in Agile Web Development with Rails 5 »

コメント

この記事へのコメントは終了しました。

トラックバック


この記事へのトラックバック一覧です: [Ruby][Rails] ActionCable in Agile Web Development with Rails 5:

« [Ruby] Rails の render | トップページ | [Ruby][Rails] ActionCable in Agile Web Development with Rails 5 »