Questions tagged [uninitialized-constant]
104 questions
0
votes
1 answer
uninitialized constant V8::JSError (NameError)
I got this error when I try to run my RoR application.
After rails server, this error appear:
uninitialized constant V8::JSError (NameError)
E:\Toan\tnkadmin>rails…

Yuto Yasunaga
- 69
- 1
- 9
0
votes
1 answer
contact form uninitialized constant contactcontroller
Hello I am trying to implement a contact form following this guide: Contact form in Rails 3
I am not using google apps but 1and1's smtp.
The error I get when I attempt to send the form is
Processing by ContactController#create as HTML
Parameters:…

Patrick
- 2,176
- 3
- 18
- 21
0
votes
1 answer
Uninitialized constant Contact (NameError) when trying to add a record
Model contact.rb:
class Contact < ActiveRecord::Base
attr_accessible :name, :phone
end
Test.rb:
Contact.create({:name => "Josh", :phone => "123-456789"})
When I run test.rb from terminal I'm receiving the error:
lib/tasks/test.rb:1:in `':…

Askar
- 5,784
- 10
- 53
- 96
0
votes
1 answer
uninitialized constant with check_box_tag using has_many :though
I'm getting the error "uninitialized constant Collection::CollectionComponent" from the check_box_tag at "@collection.components.include?" I'm not sure why this is happening as @collection seems to work fine in the form_for tag or if I remove the…

Eric Norcross
- 4,177
- 4
- 28
- 53
0
votes
2 answers
Rails 3 uninitialized constant error, has_many and belongs_to
I have created a simple has_many and belongs_to relationship between two activerecords and when i try to create uninitialized constant Tool::Version,
tool.rb:
class Tool < ActiveRecord::Base
attr_accessible :name
validates_presence_of :name
…

Arjun Ramesh
- 189
- 1
- 12
0
votes
1 answer
uninitialized constant Heroku::VERSION (NameError)
Seemingly out of the blue, I am no longer able to run "rails server" or "rails console" on this project due to the above error message. I'm rather certain I ran a "gem update heroku" on this project's RVM gemset a few days ago, so that may be the…

LanceV
- 1
- 2
-1
votes
1 answer
Uninitialized string offset error
Why I am getting uninitialized string error, I can't figure out?
Here is my function:
function show_site_name($url,$lenght)
{
$name='';
$i=0;
$slash=0;
while($slash<3 && $i<=$lenght)
{
if($url[$i]=='/') $slash++;
…

Farer
- 25
- 1
- 5
-1
votes
1 answer
Tell GCC to assume an object is initialized
When compiling in GCC with -Wall, GCC will warn about using variables that might be uninitialized. However, as the programmer, I know that a variable must be initialized if control enters a certain if statement:
int foo;
/* conditional assignment…

Bernard
- 5,209
- 1
- 34
- 64
-1
votes
2 answers
Uninitialized constant error constant Skill:Description
I am trying to make a form and submit a skill and description into a database. I am almost done however I am getting this error after submitting my info:
NameError in SkillsController#create
uninitialized constant Skill::Description
and it points…

ZachyBear
- 297
- 3
- 15
-1
votes
1 answer
uninitialized constant OrdersController
I have a Order controller and a *Order model*like this ;-
class OrderController < ApplicationController
def new
@cart=current_cart
if @cart.items.empty?
flash[:error]="Your cart is empty"
redirect_to :back
return
…

mrudult
- 2,480
- 3
- 35
- 54
-1
votes
1 answer
Ruby not recognizing Grackle object/plugin (Twitter API wrapper) -- "NameError: uninitialized constant Grackle"
The very first line of this program is where the error happens,
require 'grackle'
This is code I wrote this morning while I was in class and with the entire program (which starts with 'require grackle') I was able to read tweets and write them…

boulder_ruby
- 38,457
- 9
- 79
- 100
-2
votes
1 answer
Unitialized constant and name errors
I have a database with table user and table blacklist
In my user model I want to search for if the users ID exists in the blacklists table in the column legacy_logid.
So I define
def blacklist_ip
if Blacklists.legacy_logid == user.id
…

techguy
- 47
- 2
- 9
-2
votes
1 answer
uninitialized constant PersonsController::Users
I tried hard to find this exact match of my error but I am unable to do so. I am new to Ruby and stuck for long after this block. Please help.
I have checked my route.rb file my controller method show and my show.html.erb file error remains.
I…

usman ali
- 1
- 7
-3
votes
3 answers
Uninitialized variable trouble C++
I keep getting the error message that "'rate' is uninitialized in this function".
Can anyone off the bat see why? I've looked through my code and I'm passing it correctly on my other functions, and the error stems from this function. Any…

gf807
- 81
- 1
- 2
- 7