'what is the solution, I cant install oracle XE 21c showing this error
enter image description hereit keeps telling me to install the environment variables and I'm just getting started installing the Oracle XE 21c.oracle xe environment variables error
Solution 1:[1]
It looks as if you already installed Oracle database (or some other products?) whose installation script created those environment variables. Find them and remove them from your computer.
Solution 2:[2]
First, Ruby interpret code line by line from top to bottom, so in your case, Ruby read module A before the line define CONST =, as a result, the CONST defined in class B or C will always the output.
-> move include A below CONST=
Second, inside def self.included(clazz) the self is the module A not the class B or C, as a result, the const_set method be called by the module A itself so there's no B::CONST or C::CONST is defined here.
-> use clazz.const_set inside def self.included(clazz)
try this
module A
def self.included(base)
base.send :remove_const, :CONST if base.const_defined?(:CONST)
base.const_set(:CONST, base.name == "B" ? "constant from module A for B" : "constant from module A for C")
end
end
class B
CONST = "constant from class B"
include A
end
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Littlefoot |
| Solution 2 | Lam Phan |
