ruby - Rails Error - Uninitialized Constant -


upon setting new rails project have come across following issues on rails s command

john-macbook-pro:coffee john$ rails s /users/john/development/coffee/config/application.rb:10:in `<module:coffee>': uninitialized constant coffee::rails::application (nameerror)     /users/john/development/coffee/config/application.rb:9:in `<top (required)>'     /users/john/.rvm/gems/ruby-2.1.2/gems/railties-4.0.3/lib/rails/commands.rb:74:in `require'     /users/john/.rvm/gems/ruby-2.1.2/gems/railties-4.0.3/lib/rails/commands.rb:74:in `block in <top (required)>'     /users/john/.rvm/gems/ruby-2.1.2/gems/railties-4.0.3/lib/rails/commands.rb:71:in `tap'     /users/john/.rvm/gems/ruby-2.1.2/gems/railties-4.0.3/lib/rails/commands.rb:71:in `<top (required)>'     bin/rails:4:in `require'     bin/rails:4:in `<main>' 

what causing , how fix it?

thanks looking.

application.rb file:

require file.expand_path('../boot', __file__)  require 'rails/all'  # require gems listed in gemfile, including gems # you've limited :test, :development, or :production. bundler.require(:default, rails.env)  module coffee   class application < rails::application     # settings in config/environments/* take precedence on specified here.     # application configuration should go files in config/initializers     # -- .rb files in directory automatically loaded.      # set time.zone default specified zone , make active record auto-convert zone.     # run "rake -d time" list of tasks finding time zone names. default utc.     # config.time_zone = 'central time (us & canada)'      # default locale :en , translations config/locales/*.rb,yml auto loaded.     # config.i18n.load_path += dir[rails.root.join('my', 'locales', '*.{rb,yml}').to_s]     # config.i18n.default_locale = :de   end end 

you seem have called application 'coffee'. means have module coffee declaration in config/application.rb file.

rails uses coffee-rails gem support coffee script in rails application , declares module coffee.

you have inadvertently created name clash choice of application name.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -