Questions tagged [uninitialized-constant]
104 questions
0
votes
0 answers
Assign value to global variable after $.ajax and behave like a const
how you doing?
I wondered, there is a way to declare an immutable variable (like the const keyword) in js, but assign the value just one time after maybe an ajax request or a fetch?
My problem is quite simple: I've 3 _id that I need to retrieve from…

Giulio Terigi
- 35
- 5
0
votes
2 answers
Behaviour of Uninitialized Variables in C
I have a question regarding how uninitialized variables work in C. If I declare a variable and then print it, the program should print a random value, however my program almost always outputs 0. If I try to declare a second variable, the program…
0
votes
1 answer
Is there a way to declare the variables a and b in this code?
i am trying to call a function in main so that my code will execute through all parts of my code. Now when i call for compare_quads in main. i am getting an error code of a and b not being declared. but my problem is that i do not know how to get…

Ivickt
- 29
- 5
0
votes
1 answer
Rails 6 - Phusion error for uninitialized constant URI::Generic
I'm using rails 6.0.3.4, ruby 2.5.0 with nginx/1.18.0 (Ubuntu). Everything was fine until I did a new deploy (using capistrano) and suddenly I'm getting Could not spawn process for application /home/deploy/appname/current: The application…

Rubioli
- 670
- 6
- 21
0
votes
1 answer
Rails NameError 'uninitialized constand User::Events' using devise
I feel like the title could be more specific but I'm having a hard time understanding the issue, and I'm unsure of what the problem is so I apologize.
I have Users, created with devise, users can make events, and the events have many users…

HeyItsGwen
- 55
- 1
- 7
0
votes
2 answers
Convert rails STI type param to the actual class constant?
I am rails newbie. I create STI with the following class User and its class Teacher < User subclasses. It thrown an error when I fill in the user form.
NameError at /users
uninitialized constant…

Khu li fang
- 1
- 3
0
votes
1 answer
Construction Heuristic leaves 2 variables uninitialized
I am creating a solver using the time grain pattern. It is similar to meeting scheduling. It does have immovable entities implemented to support fixed schedules by the user.
While starting the solver the construction heuristic ends leaving -2 init…

Pratham
- 1,522
- 1
- 18
- 33
0
votes
4 answers
Uninitialized variable or array in C
Where do the results of an uninitialized array in C come from? Are they randomly assigned values or it's just previous values that are stored in the memory?
#include
int main (void)
{
int values[10];
int index;
values[0] =…

el-aasi
- 307
- 2
- 18
0
votes
0 answers
why does const_missing not find constants on modules declared inline like Base::Nested
I have a base module that has desirable class defined on it like so:
module Base
class Desirable
end
end
Now inside a nested module chain (in Base::Nested1) I would like to derive from this class. I first tried to do this like so:
module…

Mike H-R
- 7,726
- 5
- 43
- 65
0
votes
4 answers
irb returning NameError: uninitialized constant Date
ruby-v2.2.3 is supposed to have Date class preloaded into irb, however when I enter...
Date
NameError: uninitialized constant Date
from (irb):1
from /Users/noah/.rubies/ruby-2.2.3/bin/irb:11:in `'
Why should I have to require…

n.milsht
- 163
- 3
- 17
0
votes
1 answer
Uninitialized constant Model:: Error with polymorphic relation
I created a polymorphic relation in a book reviewing app that I am writing. My app has the nested models: Piece >> Section >> Subsection >> Subsubsection, and I have created a model which belongs to all of these called KeyConcept, my intention being…

Kingdavidek
- 19
- 3
0
votes
0 answers
Using Twilio in Rails 4 - Uninitialized Constant Error
I am trying to integrate Twilio with my Rails 4 app. I followed a tutorial, but I keep getting an error. Right now I am getting an Uninitialized Constant Error. I provided the code below. Thanks in advance.
Routes.rb
get '/share_over_sms' =>…

Mike Wiesenhart
- 316
- 1
- 4
- 19
0
votes
1 answer
NameError: uninitialized constant Item
I'm currently working on a Ruby on Rails app. I'm trying to create some Objects of type Item, but it cant find my model, which is already defined. What am i doing wrong?
snippet:
parse.rake (app/lib/tasks):
item = Item.create!(id: item_array['id'],…

fr0styy
- 7
- 7
0
votes
4 answers
rails 5 Uninitialized constant RackDelegation
I am working on a project which uses rails 5.0.0.rc2. Here is what I have done till now -
rails new DemoProject.
created gemset for ruby-2.3.1 and rails-5.0.0.rc2.
$ bundle install.
$ rails g model User name:string
Used devise gem.
gem 'devise'
$…

Swapnil
- 128
- 10
0
votes
1 answer
Name error:Uninitialised constant-Rails namespaced modules
I have rails app in that I have namespaced all modules required. The modules are not loading and getting Name error Uninitialised constant Udp
/app/adapters/Udp/ #Here Udp is the module name
contains two files.
first.rb
module Udp
class First…

rmn.nish
- 871
- 2
- 8
- 24