Reputation: 51
I'm getting the following errors directly after creating a new (untouched) Rails app.
Error: uninitialized constant URI::Generic,
NameError: uninitialized class variable @@schemes in URI
Where exactly is the issue?
Upvotes: 5
Views: 3594
Reputation: 6257
I had the same symptom in a different scenario. After updating a Bundler version in Dockerfile (1.7 -> 2.1), I got this error in Jenkins, whereas the error did not occur locally:
[2020-03-31T12:40:05.694Z] + bundle exec rake setup:test
[2020-03-31T12:40:06.702Z] rake aborted!
[2020-03-31T12:40:06.702Z] NameError: uninitialized constant URI::Generic
I'm not sure the exact cause of the error, but for me, the fix was to require uri
at the top of config/application.rb
:
require 'uri'
Upvotes: 0
Reputation: 11
I dont't know exactly what could cause this, BUT updating my ruby version from 2.5.0 to 2.6.5 solved it.
Upvotes: 1