Comments (3)
sorry, but how is this related to the facets project?
from facets.
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.
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 methodredefine_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)
- is:issue is:open Hash symbolize_keys stringify_keys does not work on nested hashes HOT 3
- hashify.rb bug HOT 1
- Small typo in the main README HOT 3
- `mattr`/`cattr` (aka attribute accessors) to keep up with the times HOT 6
- MIT License HOT 4
- prefer require_relative HOT 3
- Functionality to remove for 4.0.0 HOT 1
- Deprecate Hash#fetch_nested
- Documentation not working HOT 8
- ergo's behavior on nil isn't like tap HOT 1
- mention `gem :facets, require: (value)` with an array in the README HOT 1
- Unexpected test-unit behavior with facets HOT 1
- Module#attr_setter does not support frozen-string-literal
- Question on some gems
- High percentile value raises error HOT 2
- Global definition of 'with' function in Kernel module breaks rspec functionality
- Upgrading tzinfo to 1.2.7 causes: undefined method `untaint' for class `Enumerable::Recursor' HOT 2
- Answering about gem HOT 2
- Official Document Website is 404 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facets.