Questions tagged [uninitialized-constant]

104 questions
1
vote
3 answers

Cucumber/JRuby - uninitialized constant Syntax::Ruby::Set Error creating formatter: html (NameError)

I'm using a JRUBY/Cucumber/Watir framework and I have one specific features folder that keeps throwing this error every I try to use the built in HTML formatter: uninitialized constant Syntax::Ruby::Set Error creating formatter: html…
caseygrr
  • 11
  • 4
1
vote
1 answer

Ruby on Rails has_and_belongs_to_many uninitialized constant

I'm building a site on Refinery CMS, and have generated two extensions: one for Brands, and another for Bicycle Types (it's a site for a bike shop). Now, what I want to do is have the Brands extension handle the creation of brand pages, which will…
1
vote
0 answers

"uninitialized constant ActiveRecord" error when making new object of a model

I'm making a sign-up form for my website using Rails 4.0.0. In my homepage (called by a controller named 'public'), I have a form for signing up: in app/views/public/index.html.erb <%= form_for(@user) do |f| %> …
1
vote
2 answers

What does uninitialized constant mean?

I'm getting the error uninitialized constant SessionsController I've searched, and can only find explanations of this error in reference to a NameError Does anyone know what the error means?
Arel
  • 3,888
  • 6
  • 37
  • 91
1
vote
1 answer

"Uninitialized Constant" error when using local gem in Rails 3

I'm using several local gems in a rails 3 app that are loaded from vendor/gems. Here's an example of one from the Gemfile: gem 'foo', '1.3.9', :path => 'vendor/gems' When I try to run tests (i.e., bundle exec rake test) or launch the built-in…
jman
  • 392
  • 2
  • 7
1
vote
2 answers

Rails : uninitialized constant

I have a model called class App::BaseModel into a file called base_model.rb Then I have a message.rb file which on the first line has the following: class App::Message < App::BaseModel When starting the server I get the…
1
vote
0 answers

HttpHelpers routing methods in mounted rails engine results in uninitialized constant "controller name"

My environment: Rails 3.2.8 Ruby 1.9.3p194 Fedora 16 x86_64 This problem seems specific to Rails Engines. It seems that when using the HttpHelpers in a Rails Engine's routes file, I get "uninitialized constant Controller" when accessing a route…
1
vote
1 answer

Rails Uninitialized Constant in polymorphic association

I am working on making a polymorphic association of a phone number to a volunteer (and later to other things), currently i am stuck with the following error: uninitialized constant…
Ken Koch
  • 426
  • 3
  • 12
1
vote
1 answer

No route matches [POST]

on my app i have this i'm trying to create a car of a previously registered user but i got the error (tittle post) this is my carcontroller class CarController < ApplicationController def new @car = Car.new end def create @user =…
Asantoya
  • 247
  • 1
  • 4
  • 12
0
votes
1 answer

Rails Routing Issue - Uninitialized Constant Games

I am having a problem with my rails routes file. I have the following match in my routes file: match '/games/:game_id/increment_cool' => 'games/:game_id#increment_cool', :as => 'games_incrementcool' I then try to use this route from my games view…
Mike Caputo
  • 1,156
  • 17
  • 33
0
votes
0 answers

rails 2.3.5 require_role 'admin' and uninitialized constant NameError in

BUTI would like to know why when i comment require_role 'admin' in my controller everything works fine but if i UNcomment it i have an error: NameError in Asset/stationsController#index uninitialized constant Asset::StationsController I do…
mamesaye
  • 2,033
  • 2
  • 32
  • 49
0
votes
1 answer

Rails 3 NameError (uninitialized constant )

I get a NameError uninitialized constant WorkoutLog when attempting to access a non-resourceful action on a controller. My controller looks as follows: class WorkoutLogController < ApplicationController def index # random code end def…
0
votes
1 answer

Uninitialized constant Devise::SessionsController after upgrade

I have a rails 5.2 application that was built on ruby 2.7.1, devise 4.7.2, and activeadmin 2.9.0. I want to update it to the current versions. When I update ruby to 3.2.1, rails to 7.0, devise to 4.9.2, and activeadmin to 2.13, I got uninitialized…
0
votes
2 answers

Uninitialized constant for Rails 6 with Zeitwerk

I'm upgrading my Rails app from v5 to v6. The files are structured as: lib |- container |- my_module_a | |- my_class.rb | |- class_two.rb |- my_module_b my_module directory has no files in it, only my_module_a and my_module_b…
valk
  • 9,363
  • 12
  • 59
  • 79
0
votes
1 answer

No warning in case of no initialization despite -Wall in gcc

the following code does'nt produce any warning when compiled with "-Wall" option in gcc: int main () { int c, i; for ( ; i < 10; i++ ) { c += i; } return c; } This is the command used to build the source: $ gcc -c -Wall…