Upgraded Rails to 6, getting Blocked host Error

后端 未结 6 1598
闹比i
闹比i 2021-02-03 19:41

I needed the new function in ActiveStorage to resize_to_fill so I upgraded to Ruby 2.5.1 and Rails 6.

ruby \'2.5.1\'

gem \"rails\", github: \"rails/rails\"
         


        
6条回答
  •  别那么骄傲
    2021-02-03 20:22

    As I said above in my comment, here's what I did. Reposted due to down-votes.

    I added Rails.application.config.hosts << "xxxxxxx-xxxxxxx.c9users.io" to config/application.rb and it fixed my test app fine. Then I did it to my real app and it also worked. The problem is, Devise threw an error as well, which apparently won't be fixed until at least Rails 6 beta. I guess I'm going back to Carrierwave for my image sizing needs until ActiveStorage is more mature.

提交回复
热议问题