0

I use broadcast_update_to in rake task. When I use task from console

rake my:task:start

images are displayed and URL is like this:

http://localhost:3000/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBFdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--3833f3108a319f5d3bfb749027e53fc1ebdc8bc1/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCem9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RTNKbGMybDZaVjkwYjE5bWFXeHNXd2RwSG1rZSIsImV4cCI6bnVsbCwicHVyIjoidmFyaWF0aW9uIn19--1e1f53dc4dc279946af9ca0013ce3a1fd9567bf8/focia1%20(2).jpg*

but when I refresh view from rake task by crontab ( gem whenever ), images are not displayed.

First I have example.org( Rails generates for script started for example by crontab example.org ) link but then I set in development.rb:

Rails.application.routes.default_url_options[:host] = 'localhost:3000'

and still nothing ...

so I add this also in production.rb - and then example.org was replaced by localhost:3000 - but images are still not displayed.

Wordica
  • 2,427
  • 3
  • 31
  • 51

0 Answers0