0

I'm needing to generate a scaffold for my rails app, but the system keeps stating a long error involving actionpack. Problem is, actionpack is tied to many different parts of the app. If I delete it, the entire app and its files will not work. Here is the error message:

C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.5.1/lib/active_support/inflector/methods.rb:261:in `const_get': uninitialized constant User (NameError)

How can I fix this problem to generate the scaffold?

Ilya
  • 13,337
  • 5
  • 37
  • 53
metaco57
  • 155
  • 3
  • 15
  • please, write the command, that you trying to execute – Ilya Feb 07 '16 at 18:43
  • the command is "rails generate scaffold [Generate object], more specifically, – metaco57 Feb 07 '16 at 19:15
  • "rails generate scaffold member" – metaco57 Feb 07 '16 at 19:15
  • I have tried using just 'rails generate controller member', but that just returns the error message. – metaco57 Feb 07 '16 at 19:28
  • `uninitialized constant User (NameError)` - somewhere in your code you are referencing a `User` class, but there is not one defined? That is my guess based on the error message - or maybe you have a user.rb file with no `User` class defined in it? – house9 Feb 07 '16 at 19:35
  • No good. I've search all of the files within the application, and there are no files which contain a User class in the first place. If there are, they aren't based on a user.rb file. – metaco57 Feb 07 '16 at 19:41
  • Plus, it says that the actionpack gem is returning a user class error. Would uninstalling the gem do something that could fix this? – metaco57 Feb 07 '16 at 19:44
  • ok, now its saying that its activesupport. I'm not sure if an error involving this has been documented, but it now shows the error for that. – metaco57 Feb 07 '16 at 19:56
  • active support is a major component of the rails framework - this error is most likely occurring while active support is booting up the application, it is generating classes based on file names, etc... are you sure you don't have a `user.rb` file in your project? – house9 Feb 08 '16 at 20:47

0 Answers0