Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config/environments/development.rb:53:in `block in <top (required)>': uninitialized constant ActiveSupport::EventedFileUpdateChecker (NameErro #27462

Closed
rezapci opened this issue Dec 27, 2016 · 8 comments
Labels

Comments

@rezapci
Copy link

rezapci commented Dec 27, 2016

 [reza@1610:~/Demo/railsgirls$ bin/rails generate controller Say hello goodbye

/home/reza/Demo/railsgirls/config/environments/development.rb:53:in `block in <top (required)>': uninitialized constant ActiveSupport::EventedFileUpdateChecker (NameError)
	from /usr/lib/ruby/vendor_ruby/rails/railtie.rb:210:in `instance_eval'
	from /usr/lib/ruby/vendor_ruby/rails/railtie.rb:210:in `configure'
	from /home/reza/Demo/railsgirls/config/environments/development.rb:1:in `<top (required)>'
	from /usr/lib/ruby/vendor_ruby/rails/engine.rb:598:in `block (2 levels) in <class:Engine>'
	from /usr/lib/ruby/vendor_ruby/rails/engine.rb:597:in `each'
	from /usr/lib/ruby/vendor_ruby/rails/engine.rb:597:in `block in <class:Engine>'
	from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in `instance_exec'
	from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in `run'
	from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:55:in `block in run_initializers'
	from /usr/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
	from /usr/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
	from /usr/lib/ruby/2.3.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
	from /usr/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
	from /usr/lib/ruby/2.3.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
	from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:44:in `each'
	from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:44:in `tsort_each_child'
	from /usr/lib/ruby/2.3.0/tsort.rb:415:in `call'
	from /usr/lib/ruby/2.3.0/tsort.rb:415:in `each_strongly_connected_component_from'
	from /usr/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
	from /usr/lib/ruby/2.3.0/tsort.rb:347:in `each'
	from /usr/lib/ruby/2.3.0/tsort.rb:347:in `call'
	from /usr/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
	from /usr/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
	from /usr/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
	from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:54:in `run_initializers'
	from /usr/lib/ruby/vendor_ruby/rails/application.rb:352:in `initialize!'
	from /home/reza/Demo/railsgirls/config/environment.rb:5:in `<top (required)>'
	from /var/lib/gems/2.3.0/gems/spring-2.0.0/lib/spring/application.rb:92:in `require'
	from /var/lib/gems/2.3.0/gems/spring-2.0.0/lib/spring/application.rb:92:in `preload'
	from /var/lib/gems/2.3.0/gems/spring-2.0.0/lib/spring/application.rb:143:in `serve'
	from /var/lib/gems/2.3.0/gems/spring-2.0.0/lib/spring/application.rb:131:in `block in run'
	from /var/lib/gems/2.3.0/gems/spring-2.0.0/lib/spring/application.rb:125:in `loop'
	from /var/lib/gems/2.3.0/gems/spring-2.0.0/lib/spring/application.rb:125:in `run'
	from /var/lib/gems/2.3.0/gems/spring-2.0.0/lib/spring/application/boot.rb:19:in `<top (required)>'
	from /usr/local/lib/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/local/lib/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from -e:1:in `<main>'](http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html#creating-a-bug-report))

i created a rails new app, after the installation I add bundle exec rails about, then when I add bin/rails generate controller Say hello goodbye. that shows the error.

System configuration

Rails version:
rails version
Rails 5.0.1
Ruby version:
rvm install ruby-2.3.1
rvm install ruby-2.3
rvm install 2.3.1
rvm install 2.3

how could i fix this?
https://gyazo.com/b25e8282c50f79488087c71e3d12e095 #

@prathamesh-sonpatki
Copy link
Member

Could not reproduce on the brand new app setup from scratch:

$ rails -v
Rails 5.0.1
$ rails new rails_demo_app
$ cd rails_demo_app/
$ bin/rails generate controller Say hello goodbye
/Users/prathamesh/.rbenv/versions/ruby-dev/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is deprecated
/Users/prathamesh/.rbenv/versions/ruby-dev/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:52: warning: constant ::Bignum is deprecated
/Users/prathamesh/.rbenv/versions/ruby-dev/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/core_ext/numeric/conversions.rb:138: warning: constant ::Fixnum is deprecated
Running via Spring preloader in process 21156
Expected string default value for '--jbuilder'; got true (boolean)
Expected string default value for '--helper'; got true (boolean)
Expected string default value for '--assets'; got true (boolean)
      create  app/controllers/say_controller.rb
       route  get 'say/goodbye'
       route  get 'say/hello'
      invoke  erb
      create    app/views/say
      create    app/views/say/hello.html.erb
      create    app/views/say/goodbye.html.erb
      invoke  test_unit
      create    test/controllers/say_controller_test.rb
      invoke  helper
      create    app/helpers/say_helper.rb
      invoke    test_unit
      invoke  assets
      invoke    coffee
      create      app/assets/javascripts/say.coffee
      invoke    scss
      create      app/assets/stylesheets/say.scss

Was there anything else that you had done before running the generate command?

@rezapci
Copy link
Author

rezapci commented Dec 27, 2016

nothing i just follow the instruction on my book..!!!

@matthewd
Copy link
Member

/usr/lib/ruby/vendor_ruby/rails

That sounds like it's been installed with an OS package, not a gem.

Most likely this is a version mismatch between the loaded components and the generated application; if Active Support 5.0 was loaded, that class would be defined.

@marceloboeira
Copy link

marceloboeira commented Dec 30, 2016

Same problem here with Rails 5.0.1 and Ruby 2.4.0.

Everything works but I always get a warning like:

/Users/prathamesh/.rbenv/versions/ruby-dev/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is deprecated
/Users/prathamesh/.rbenv/versions/ruby-dev/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:52: warning: constant ::Bignum is deprecated
/Users/prathamesh/.rbenv/versions/ruby-dev/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/core_ext/numeric/conversions.rb:138: warning: constant ::Fixnum is deprecated
Ru

@CliffordBernard
Copy link

I get this when I run rake commands. Everything seems to work fine.

.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is deprecated
.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:52: warning: constant ::Bignum is deprecated
.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/core_ext/numeric/conversions.rb:138: warning: constant ::Fixnum is deprecated

@kaspth
Copy link
Contributor

kaspth commented Dec 30, 2016

@marceloboeira @CliffordBernard those will go away in 5.0.2 when #27458 goes out 😉

@marceloboeira
Copy link

@kaspth thanks!

@pixeltrix
Copy link
Contributor

Closing since this is fixed in 5-0-stable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants