Questions tagged [uninitialized-constant]

104 questions
0
votes
2 answers

Name error uninitialized constant module rails

I have a rails application in that I have modules inside /app/adapters/UDB/ folder. The module is not loading. I have added the following in application.rb config.autoload_paths += Dir["#{config.root}/app/adapters/**/*"] I am calling module from…
rmn.nish
  • 871
  • 2
  • 8
  • 24
0
votes
1 answer

Rails 4.2.0 defined? returns inconsistent results

Rails 4.2.0 / Ruby 2.2.1 I am facing inconsistent behaviour when using defined? to check if a class having given name exists or not. I want to avoid rescuing exceptions thus using the predicate method. But as can be seen below it is returning…
Jignesh Gohel
  • 6,236
  • 6
  • 53
  • 89
0
votes
1 answer

ruby rails 4.1 module - inconsistent error - not initialized "uninitialized constant"

I'm using ruby 2.1.5 and rails 4.1 in the following folder structure: - lib/ - notifications/ - notifications.rb - group_actions.rb # notifications.rb module Notifications end # group_actions.rb class GroupActions …
0
votes
1 answer

Active Admin Name Error uninitializedconstant Resource::Users

So I have a couple of models in my app and they are all registered with ActiveAdmin. They all work great except for one and I can't figure out why. I keep getting the same error: NameError at /admin/reports uninitialized constant…
0
votes
2 answers

Error while typing rails server command

I am a beginner.I am trying to launch rails server using the command.But I am getting an error. I tried searching in the google but no results.I will attach a picture of the log I got when I executed that command.
mRbOneS
  • 121
  • 1
  • 14
0
votes
2 answers

I'm getting error "uninitialized constant SongsController" on ruby on rails

I'm getting an error like that, I'm new in rails. my routes.rb Rails.application.routes.draw do get 'welcome' => 'page#search' resources :songs end search.html.erb <%=form_for @song do |f|%> <%=f.text_field :search%> <%=f.submit…
0
votes
1 answer

ActiveShipping and Grape (Rails) - uninitialized constant API::V1::Shippings::ActiveShipping

I use Grape to create an API in rails. Now I want to use Shopify's Active Shipping gem but when I try to use this in my custom_helper within Grape I get a uninitialized constant ActiveShipping error message. In addition I also get the following…
PSR
  • 513
  • 6
  • 16
0
votes
0 answers

Cannot start Rails Server because of a MongoMapper (NameError)

I'm a newcoming to Ruby on Rails and MongoDB, but I'd like to start running any Rails apps I make on MongoDB. I'm following a brief tutorial on MongoDB's website (http://docs.mongodb.org/ecosystem/tutorial/model-data-for-ruby-on-rails/), and I've…
0
votes
2 answers

Uninitialized constant using nested forms in Rails

I keep getting an error saying uninitialized constant Page::PageAttachment when trying to create a nested form using the nested_form gem. Here is some relevant code. Let me know if you need any other code or have any questions. Stacktrace isn't…
ryanpitts1
  • 862
  • 1
  • 16
  • 33
0
votes
1 answer

Rails not finding Admins constant on Simple Form submission

Rails is not liking my namespacing -- even though I think I'm adhering to convention. Help? I'm uing simple_form to create an admin form, and on submission, I get the error: uninitialized constant Admins My AdminsController looks as such: class…
0
votes
0 answers

Rails error uninitialized constant User::Friendship

I'm working on a project that has a typical friendship model. User Class needs to have a self-referencing relationship so each user can befriend multiple friends and can be befriended by multiple users... In short i need the exact same thing…
Umer Hassam
  • 1,332
  • 5
  • 23
  • 42
0
votes
0 answers

Uninitialized Constant, request Parameters ???? Lost with errors

I am following this tutorial on rails (http://tutorials.jumpstartlab.com/projects/merchant.html) and running into an error I have been getting for a while now. The error message that I am getting is below stating uninitialized constant…
illywilly
  • 323
  • 1
  • 5
  • 18
0
votes
1 answer

uninitialized constant Die (NameError)

I'm receiving an Uninitialized constant error from my code. I have searched around with no luck. Any help would be highly appreciated. Class Die def initialize roll end def roll @num_showing = 1 + rand(6) end …
LaurentL
  • 203
  • 1
  • 3
  • 11
0
votes
0 answers

Uninitialized constant error in controller#create

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…
0
votes
2 answers

Uninitialized variables - Stack examination

Let's assume that I'm programming this code in C. If I have an uninitialized variable number I can't know what will be its value. BUT... WHAT IS that random value? What do I have in a memory dump? Is it because an address is tried to be read and…
peperunas
  • 428
  • 1
  • 6
  • 17