uninitialized constant Mime::JSON in an admittedly older application
An Rails 4.0.0 application needs some changes. I downloaded the repository, bundled and installed.
Upon creation of the databse via the rake task, uninitialized constant Mime::JSON is being encountered.
I removed the quoted version of jBuilder installed anew and the one that got installed is 1.5.3. Yes it is still old.
Given a large number of changes to JSON handling as of 4.1, that sounds plausible.
The specific error, when attempting to start the server is:
.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/jbuilder-1.5.3/lib/jbuilder/jbuilder_template.rb:110:in <class:JbuilderHandler>
How can this matter get resolved?
Having the same issue
I somehow got this resolved, but am unsure of what did it, as a number of gems were unversioned and the install process pushed things past reasonable limits. Find the latest version of Gemfile.lock where jbuilder was installing properly and verify which dependencies are different.
What I do know is that I had to drop ruby version down. jbuilder has no ruby dependencies at that stage (it popped up later), but it depends on activesupport and multi_json. activesupportgem is ruby version sensitive.