Wanted to try react-rails gem, and I followed a beginners tutorial and ran early into this problem:
on issuing: rails g react:install
C:/Users/Apophis/Downloads/Projects/react/config/application.rb:10:in `<module:React>': uninitialized constant React::Rails::Application (NameError)
from C:/Users/Apophis/Downloads/Projects/react/config/application.rb:9:in `<top (required)>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:141:in `require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:141:in `require_application_and_environment!'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:128:in `generate_or_destroy'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:50:in `generate'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Freshly created rails app with Rails 4.2.5.1 / react-rails is the only gem I added by hand to the Gemfile. The bundle install worked without a problem "Using react-rails 1.5.0"
I searched for a bug and landed on Report #331 - It does not look like they are related, reorder did not help and I have only the standard gems in the Gemfile.
The installation is on windows, and here is my Gemfile.lock
Huh, I wonder where that's coming from. Could you share this file too?
C:/Users/Apophis/Downloads/Projects/react/config/application.rb
That looks like the first trigger of the bug, but I'm not sure what's in that file!
The Problem was indeed in that File:
module React
class Application < Rails::Application
end
end
The problem was that I created a new app with the name react: Solution DO NOT create an application with the name react, any other name works like a charm. That was bad luck.
rails new react
Thanks, case closed
wow, crazy! glad you got to the bottom of it!
hahah just got the same exact error, fresh new app called react to try this out
Most helpful comment
The Problem was indeed in that File:
The problem was that I created a new app with the name react: Solution DO NOT create an application with the name react, any other name works like a charm. That was bad luck.
Thanks, case closed