You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Capitalised variables or Camel case variables are realised as Ruby Constants and there by throwing a NameError as they are invoked with out prior initialisation. The error message looks as follows:
The above error is triggered when seamore process encounters the following line in the script
cmorize CO2f_day => [fgco2_Omon]
In Ruby, variable names which are in capitals or Camel case are treated as constants and it is required to set a value to constant variable prior to using them. Here CO2f_day is treated as Ruby constant since it is starting with a capital letter C and it is invoked (or called) with out prior initialization, resulting in an Error.
Apparently, a simple fix in the script is to first setting a value to this variable before calling it as follows:
Capitalised variables or Camel case variables are realised as Ruby Constants and there by throwing a
NameError
as they are invoked with out prior initialisation. The error message looks as follows:error: uninitialized constant #<Class:#<CMORizer::Project:0x000055d6bcccad38>>::CO2f_day (NameError)
The above error is triggered when
seamore process
encounters the following line in the scriptcmorize CO2f_day => [fgco2_Omon]
In Ruby, variable names which are in capitals or Camel case are treated as constants and it is required to set a value to constant variable prior to using them. Here
CO2f_day
is treated as Ruby constant since it is starting with a capital letterC
and it is invoked (or called) with out prior initialization, resulting in an Error.Apparently, a simple fix in the script is to first setting a value to this variable before calling it as follows:
Question: Does the seamore tool support variable with Camel case or which are Capitalised?
P.S.:
test_cmorizer.rb
does not cover this edge case.The text was updated successfully, but these errors were encountered: