2

I'm trying to deploy my spree project to heroku, but I'm getting the following error message: "Unable to load application: RuntimeError: can't modify frozen Array"

Using the backtrace, this is because deface is calling reject! method on eager_load_paths (deface/railtie.rb:39, using deface 1.1.0). It seems like this is a problem because that eager_load_paths array has already been frozen by railties (lib/rail/engine.rb:571, using rails 5.0.1)?

This doesn't break in development, but for some reason prevents me from opening up my app in production. Any guesses?

RyanQuey
  • 705
  • 1
  • 9
  • 29
  • Do you remember what was the issue ? As i am facing something similar now – Rahul Dess Apr 15 '19 at 02:51
  • @RahulDess sorry, I don't. I do remember that I ended up switching away from Spree to use Solidus instead, and I think I stopped using Deface so much, by just overriding files from the gem in my repository (eg, if spree had a view at `[sample-gem-folder]/app/views/spree/example.erb.html` I made one in `[my-app]/app/views/spree/example.erb.html`.). But I don't remember if I did either of these as a direct response to this problem or just a number of problems that were adding up. Sorry I can't be more helpful. It would have been nice if someone had an answer for this two years ago! – RyanQuey Apr 16 '19 at 04:03
  • Of course I didn't have an answer to contribute either haha, so not casting blame, just saying that I wish I could help, but can't – RyanQuey Apr 16 '19 at 04:04
  • no worries. Actually i figured out the issue causing in my case. – Rahul Dess Apr 18 '19 at 21:27
  • @RahulDess If it solved your issue, do you mind posting an answer to share with others who run across this issue? – RyanQuey Apr 26 '19 at 02:51
  • 1
    In my case, it was specific to `OmniAuth` Gem using `Rails.application.config.middleware.use OmniAuth::Builder do` twice both in `initializer` and in `lib` folder. Had to remove in one of the places. – Rahul Dess Apr 26 '19 at 17:00

0 Answers0