Search code examples
ruby-on-railsrubysimple-form

Error from simple_form when starting up the server


I've cloned a project from GitHub, however when I try to run rails server it throws me an error:

=> Booting WEBrick
=> Rails 4.2.4 application starting in development on http://localhost:3000
=> Run rails server -h for more startup options
=> Ctrl-C to shutdown server
[Simple Form] Simple Form is not configured in the application and will use the default values. Use rails generate simple_form:install to generate the Simple Form configuration.
Exiting

Then I try to run the installation of simple_form, but again, the same error appears

[Simple Form] Simple Form is not configured in the application and will use the default values. Use rails generate simple_form:install to generate the Simple Form configuration.
/home/andres/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.4/lib/active_support/inflector/methods.rb:261:in `const_get': uninitialized constant User (NameError)
    from /home/andres/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.4/lib/active_support/inflector/methods.rb:261:in `block in constantize'

I'm using the version 3.2.0 of the gem on a Rails 4.2.4 installation, which could be causing the error?


Solution

  • The error is in your Routes file. Possibly "devise_for :users" line.

    Were you trying to setup Devise and didn't set it up completely ? Seems like that

    Check https://github.com/plataformatec/devise for documentation and setup instructions