Giter VIP home page Giter VIP logo

Comments (3)

esparta avatar esparta commented on August 18, 2024

sorry, but how is this related to the facets project?

from facets.

jerimiahmilton avatar jerimiahmilton commented on August 18, 2024

I'm getting a similar issue, when trying to run tests.

root@f25c0324ad71:/app# bundle exec rake spec
/usr/local/bin/ruby -I/usr/local/bundle/gems/rspec-core-3.6.0/lib:/usr/local/bundle/gems/rspec-support-3.6.0/lib /usr/local/bundle/gems/rspec-core-3.6.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb

An error occurred while loading ./spec/acceptance/estimates_spec.rb.
Failure/Error: require "rspec/rails"

NoMethodError:
  private method `redefine_method' called for #<Class:ActionView::TestCase::TestController>
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/core_ext/module/redefine_method.rb:36:in `redefine_singleton_method'
# /usr/local/bundle/gems/actionpack-5.2.4.3/lib/action_dispatch/routing/route_set.rb:560:in `block (2 levels) in url_helpers'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/concern.rb:122:in `class_eval'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/concern.rb:122:in `append_features'
# /usr/local/bundle/gems/actionpack-5.2.4.3/lib/abstract_controller/railties/routes_helpers.rb:13:in `include'
# /usr/local/bundle/gems/actionpack-5.2.4.3/lib/abstract_controller/railties/routes_helpers.rb:13:in `block (2 levels) in with'
# /usr/local/bundle/gems/actionpack-5.2.4.3/lib/action_controller/railties/helpers.rb:7:in `inherited'
# /usr/local/bundle/gems/actionview-5.2.4.3/lib/action_view/test_case.rb:13:in `<class:TestCase>'
# /usr/local/bundle/gems/actionview-5.2.4.3/lib/action_view/test_case.rb:12:in `<module:ActionView>'
# /usr/local/bundle/gems/actionview-5.2.4.3/lib/action_view/test_case.rb:10:in `<top (required)>'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
# /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
# ./spec/rails_helper.rb:9:in `<top (required)>'
# ./spec/acceptance/estimates_spec.rb:3:in `require'
# ./spec/acceptance/estimates_spec.rb:3:in `<top (required)>'

from facets.

CoderMiguel avatar CoderMiguel commented on August 18, 2024

Running into a similar issue when adding the Facets gem to an existing project.

When just adding the gem:

WARN: NoMethodError: private method `redefine_method' called for #<Class:ActiveModel::Error>

    singleton_class.redefine_method(method, &block)
                   ^^^^^^^^^^^^^^^^
Did you mean?  define_method
WARN: /usr/local/bundle/gems/activesupport-6.1.7/lib/active_support/core_ext/module/redefine_method.rb:27:in `redefine_singleton_method'
/usr/local/bundle/gems/activemodel-6.1.7/lib/active_model/error.rb:13:in `i18n_customize_full_message='
/usr/local/bundle/gems/activesupport-6.1.7/lib/active_support/core_ext/class/attribute.rb:129:in `public_send'
/usr/local/bundle/gems/activesupport-6.1.7/lib/active_support/core_ext/class/attribute.rb:129:in `block in class_attribute'
/usr/local/bundle/gems/activesupport-6.1.7/lib/active_support/core_ext/class/attribute.rb:129:in `each'
/usr/local/bundle/gems/activesupport-6.1.7/lib/active_support/core_ext/class/attribute.rb:129:in `class_attribute'

This is very similar to both of the errors listed above, just with a newer version of ActiveStorage.

observed by trishtzy

vendor/gem/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/core_ext/module/redefine_method.rb:27:in redefine_singleton_method': private method redefine_method' called for #Class:ActiveSupport::ExecutionWrapper (NoMethodError)

observed by OBCENEIKON

NoMethodError:
private method redefine_method' called for #<Class:ActionView::TestCase::TestController> /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/core_ext/module/redefine_method.rb:36:in redefine_singleton_method'

researching this error lead me to this issue and the suggestions here.

Applying the most recent suggestion, without cherry picking results in a different Active Support error:

/usr/local/bundle/gems/activesupport-6.1.7/lib/active_support/core_ext/module/attr_internal.rb:33:in `public_send': protected method `attr_reader' called for ActionView::Helpers::ControllerHelper:Module (NoMethodError)
 
       public_send("attr_#{type}", internal_name)
       ^^^^^^^^^^^
 Did you mean?  cattr_reader
                mattr_reader
                attr_setter
        from /usr/local/bundle/gems/activesupport-6.1.7/lib/active_support/core_ext/module/attr_internal.rb:33:in `attr_internal_define'

When cherry picking just "facets/string", this introduces an error with Active Admin:

WARN: NameError: wrong constant name stringSymbolOrProcSetting

      raise ArgumentError, "Unknown type: #{type}" unless ActiveAdmin.const_defined?(klass)
                                                                     ^^^^^^^^^^^^^^^
2022-10-19T20:15:16.800Z pid=37 tid=8el WARN: /usr/local/bundle/gems/activeadmin-2.10.1/lib/active_admin/dynamic_setting.rb:11:in `const_defined?'

when cherry picking "facets/string/snakecase", we are back to Active Support, but with a third error:

WARN: NameError: uninitialized constant ActionText::ContentHelper
2022-10-19T20:18:22.709Z pid=1 tid=8fd WARN: /usr/local/bundle/gems/activesupport-6.1.7/lib/active_support/inflector/methods.rb:288:in `const_get'
/usr/local/bundle/gems/activesupport-6.1.7/lib/active_support/inflector/methods.rb:288:in `block in constantize'
/usr/local/bundle/gems/activesupport-6.1.7/lib/active_support/inflector/methods.rb:284:in `each'

from facets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.