Hi I am calling a worker from controller I am getting this error when I called. Can any one help me
#<NoMethodError: undefined method `invokable_worker_methods' for nil:NilClass>
/home/web/a.a.com/vendor/plugins/backgroundrb/server/lib/master_worker.rb:129:in `worker_methods'
/home/web/a.a.com/vendor/plugins/backgroundrb/server/lib/master_worker.rb:107:in `async_method_invoke'
/home/web/a.a.com/vendor/plugins/backgroundrb/server/lib/master_worker.rb:38:in `receive_data'
/usr/local/lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_parser.rb:44:in `extract'
/usr/local/lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_parser.rb:26:in `loop'
/usr/local/lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_parser.rb:26:in `extract'
/home/web/a.a.com/vendor/plugins/backgroundrb/server/lib/master_worker.rb:32:in `receive_data'
/usr/local/lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_core.rb:230:in `read_external_socket'
/usr/local/lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_core.rb:222:in `handle_external_messages'
/usr/local/lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_core.rb:196:in `handle_read_event'
/usr/local/lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_core.rb:192:in `each'
/usr/local/lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_core.rb:192:in `handle_read_event'
/usr/local/lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_core.rb:146:in `start_reactor'
/usr/local/lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_core.rb:139:in `loop'
/usr/local/lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_core.rb:139:in `start_reactor'
/usr/local/lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_master.rb:21:in `run'
/home/web/a.a.com/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:14:in `initialize'
/home/web/a.a.com/vendor/plugins/backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:109:in `new'
/home/web/a.a.com/vendor/plugins/backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:109:in `start_bdrb'
/home/web/a.a.com/vendor/plugins/backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:16:in `start'
/home/web/a.a.com/script/backgroundrb:24
Related
I am running this simple ruby code block with Ferrum gem.
require "ferrum"
browser = Ferrum::Browser.new
browser.go_to("http://grmdaily.com/")
browser.evaluate("pbjs.getConfig()") #throws error stack below
and getting this error:
2022-08-22T15:47:44.660Z pid=86509 tid=3xh WARN: NoMethodError: undefined method `[]' for nil:NilClass
2022-08-22T15:47:44.660Z pid=86509 tid=3xh WARN: /usr/share/rvm/gems/ruby-2.7.2/gems/ferrum-0.11/lib/ferrum/frame/runtime.rb:193:in `block in handle_response'
/usr/share/rvm/gems/ruby-2.7.2/gems/ferrum-0.11/lib/ferrum/frame/runtime.rb:220:in `block in reduce_props'
/usr/share/rvm/gems/ruby-2.7.2/gems/ferrum-0.11/lib/ferrum/frame/runtime.rb:218:in `each'
/usr/share/rvm/gems/ruby-2.7.2/gems/ferrum-0.11/lib/ferrum/frame/runtime.rb:218:in `reduce'
/usr/share/rvm/gems/ruby-2.7.2/gems/ferrum-0.11/lib/ferrum/frame/runtime.rb:218:in `reduce_props'
/usr/share/rvm/gems/ruby-2.7.2/gems/ferrum-0.11/lib/ferrum/frame/runtime.rb:192:in `handle_response'
/usr/share/rvm/gems/ruby-2.7.2/gems/ferrum-0.11/lib/ferrum/frame/runtime.rb:144:in `block in call'
/usr/share/rvm/gems/ruby-2.7.2/gems/ferrum-0.11/lib/ferrum.rb:145:in `with_attempts'
/usr/share/rvm/gems/ruby-2.7.2/gems/ferrum-0.11/lib/ferrum/frame/runtime.rb:124:in `call'
/usr/share/rvm/gems/ruby-2.7.2/gems/ferrum-0.11/lib/ferrum/frame/runtime.rb:50:in `evaluate'
/usr/share/rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/forwardable.rb:235:in `evaluate'
/usr/share/rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/forwardable.rb:235:in `evaluate'
The line 'pbjs.getConfig()' returns object on real window.
What I am doing wrong or missing?
Wanted to run my app, as always, on on iOS Simulator. When I clicked on run, I get the error, which can be seen below. No major changes were made in the app, just some texts were changed.
Launching lib/main.dart on iPhone 6 in debug mode...
Running pod install...
CocoaPods' output:
...
...
...
```
### Error
```
NoMethodError - undefined method `size' for nil:NilClass
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/macho_file.rb:455:in `populate_mach_header'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/macho_file.rb:233:in `populate_fields'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/macho_file.rb:55:in `initialize_from_bin'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/macho_file.rb:33:in `new_from_bin'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/fat_file.rb:365:in `block in populate_machos'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/fat_file.rb:364:in `each'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/fat_file.rb:364:in `populate_machos'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/fat_file.rb:156:in `populate_fields'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/fat_file.rb:95:in `initialize'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho.rb:31:in `new'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho.rb:31:in `open'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/xcode/linkage_analyzer.rb:16:in `dynamic_binary?'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/sandbox/file_accessor.rb:171:in `block in vendored_dynamic_frameworks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/sandbox/file_accessor.rb:170:in `select'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/sandbox/file_accessor.rb:170:in `vendored_dynamic_frameworks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/sandbox/file_accessor.rb:179:in `vendored_static_frameworks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:679:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:679:in `flat_map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:679:in `block in <class:PodTargetSettings>'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:114:in `block in define_build_settings_method'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:596:in `block in <class:PodTargetSettings>'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:114:in `block in define_build_settings_method'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:630:in `block in <class:PodTargetSettings>'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:114:in `block in define_build_settings_method'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:995:in `block in <class:PodTargetSettings>'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:114:in `block in define_build_settings_method'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:752:in `block in <class:PodTargetSettings>'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:114:in `block in define_build_settings_method'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:362:in `public_send'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:362:in `block in to_h'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:361:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:361:in `to_h'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:174:in `block in <class:BuildSettings>'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:544:in `block in <class:PodTargetSettings>'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/target/build_settings.rb:114:in `block in define_build_settings_method'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/pods_project_generator/target_installer_helper.rb:16:in `update_changed_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:584:in `block in create_xcconfig_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:582:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:582:in `create_xcconfig_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:45:in `block in install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:145:in `message'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:34:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:114:in `block in install_pod_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:111:in `map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:111:in `install_pod_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:32:in `block in install_all_pod_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:145:in `message'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:31:in `install_all_pod_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:19:in `generate!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:308:in `block in create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:303:in `create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:295:in `generate_pods_project'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:174:in `integrate'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:162:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
```
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=undefined+method+%60size%27+for+nil%3ANilClass&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
- NoMethodError - undefined method `size' for nil:NilClass
https://github.com/CocoaPods/CocoaPods/issues/8377 [closed] [14 comments]
a week ago
- NoMethodError - undefined method `each' for nil:NilClass
https://github.com/CocoaPods/CocoaPods/issues/9239 [closed] [5 comments]
2 weeks ago
- NoMethodError - undefined method `size' for nil:NilClass
https://github.com/CocoaPods/CocoaPods/issues/9484 [closed] [9 comments]
14 Apr 2020
and 4 more at:
https://github.com/cocoapods/cocoapods/search?q=undefined%20method%20%60size%27%20for%20nil&type=Issues&utf8=✓
Error running pod install
Error launching application on iPhone 6.```
Someone has an idea, what the problem could be?
I am constantly getting this error and unable to understand the issue. As the whole stack does not have any of my code. The only hint i have is that this started happening after a git merge.
Here is the error stack please let me know if you have any clue. Thanks
NoMethodError: undefined method `each' for nil:NilClass
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/ac
tion_controller/test_case.rb:58:in `teardown_subscriptions'
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib
/active_support/callbacks.rb:432:in `block in make_lambda'
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib
/active_support/callbacks.rb:263:in `call'
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib
/active_support/callbacks.rb:263:in `block in simple'
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib
/active_support/callbacks.rb:506:in `call'
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib
/active_support/callbacks.rb:506:in `block in call'
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib
/active_support/callbacks.rb:506:in `each'
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib
/active_support/callbacks.rb:506:in `call'
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib
/active_support/callbacks.rb:92:in `_run_callbacks'
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib
/active_support/callbacks.rb:776:in `_run_teardown_callbacks'
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib
/active_support/callbacks.rb:81:in `run_callbacks'
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib
/active_support/testing/setup_and_teardown.rb:45:in `after_teardown'
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.1/lib/
active_record/fixtures.rb:829:in `after_teardown'
One of the model validation was failing while loading the fixtures.This validation error was not thrown and the test cases failed with the message 'NoMethodError: undefined method `each' for nil:NilClass'
Sorry to copy in this entire log, but I'm hoping it might make more sense to someone familiar with this issue. When devise began setting up the user model I wasn't given the option (I never pressed enter) and the install proceeded and crashed, outputting the following. Thanks!
? What would you like the user model to be called? Press <enter> for [user] > - Now setting up devise with user model name 'user':
generate devise
invoke active_record
create db/migrate/20120825075751_add_devise_to_users.rb
insert app/models/user.rb
route devise_for :users
- Now you'll need an initializer...
create config/initializers/rails_admin.rb
/home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:385:in `block in source_reflection': undefined method `klass' for nil:NilClass (NoMethodError)
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:385:in `collect'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:385:in `source_reflection'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:375:in `rescue in foreign_key'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:373:in `foreign_key'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:259:in `association_foreign_key_lookup'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:71:in `block in associations'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:64:in `map'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:64:in `associations'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:29:in `block (2 levels) in polymorphic_parents'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:28:in `each'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:28:in `block in polymorphic_parents'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:27:in `tap'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:27:in `polymorphic_parents'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:222:in `association_model_lookup'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:69:in `block (2 levels) in associations'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/fields/types/polymorphic_association.rb:49:in `call'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/fields/types/polymorphic_association.rb:49:in `associated_model_config'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/fields/types/polymorphic_association.rb:19:in `block in <class:PolymorphicAssociation>'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/configurable.rb:68:in `instance_eval'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/configurable.rb:68:in `block in register_instance_option'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/configurable.rb:42:in `block in register_instance_option'
from (erb):86:in `block (2 levels) in template'
from (erb):85:in `map'
from (erb):85:in `block in template'
from (erb):82:in `map'
from (erb):82:in `template'
from /home/funkdified/.rvm/rubies/ruby-1.9.3-p125-HEAD/lib/ruby/1.9.1/erb.rb:838:in `eval'
from /home/funkdified/.rvm/rubies/ruby-1.9.3-p125-HEAD/lib/ruby/1.9.1/erb.rb:838:in `result'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/file_manipulation.rb:111:in `block in template'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:54:in `call'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:54:in `render'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:63:in `block (2 levels) in invoke!'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:63:in `open'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:63:in `block in invoke!'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:133:in `call'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:133:in `invoke_with_conflict_check'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:61:in `invoke!'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions.rb:95:in `action'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:26:in `create_file'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/file_manipulation.rb:110:in `template'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/generators/rails_admin/install_generator.rb:59:in `install'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `block in invoke_all'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `each'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `map'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `invoke_all'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/group.rb:238:in `dispatch'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/railties-3.2.8/lib/rails/generators.rb:171:in `invoke'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/railties-3.2.8/lib/rails/commands/generate.rb:12:in `<top (required)>'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/railties-3.2.8/lib/rails/commands.rb:29:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I figured it out. I installed devise first to debug and found it was an issue with my existing User model. I needed to drop the User table and start over.
When I work with object of type Staffer, which inherits User which inherits ActiveRecord::Base I get the error "TypeError: allocator undefined for Proc".
I'm not sure what caused it to start happening and unfortunately it won't be easy to track down the commit that did. Since the system was working properly, user.rb didn't change and staffer.rb only change one line to remove an unused constant.
I first noticed the error when running a rake task and the error is generated from a line that does this:
attributes.slice("id", "email", "state")
further investigation showed that this triggers the error too:
puts attributes
and this is the backtrace:
rake aborted!
allocator undefined for Proc
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:227:in `allocate'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:227:in `revive'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:183:in `visit_Psych_Nodes_Mapping'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/delayed_job-3.0.1/lib/delayed/psych_ext.rb:119:in `visit_Psych_Nodes_Mapping_with_class'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `block in revive'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `map'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `revive'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:183:in `visit_Psych_Nodes_Mapping'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/delayed_job-3.0.1/lib/delayed/psych_ext.rb:119:in `visit_Psych_Nodes_Mapping_with_class'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:116:in `block in visit_Psych_Nodes_Sequence'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:116:in `each'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:116:in `visit_Psych_Nodes_Sequence'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:8:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `block in revive'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `map'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `revive'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:183:in `visit_Psych_Nodes_Mapping'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/delayed_job-3.0.1/lib/delayed/psych_ext.rb:119:in `visit_Psych_Nodes_Mapping_with_class'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `block in revive'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `map'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `revive'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:183:in `visit_Psych_Nodes_Mapping'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/delayed_job-3.0.1/lib/delayed/psych_ext.rb:119:in `visit_Psych_Nodes_Mapping_with_class'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:191:in `block in visit_Psych_Nodes_Mapping'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:190:in `each'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:190:in `each_slice'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:190:in `visit_Psych_Nodes_Mapping'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/delayed_job-3.0.1/lib/delayed/psych_ext.rb:119:in `visit_Psych_Nodes_Mapping_with_class'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/nodes/node.rb:25:in `to_ruby'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:107:in `load'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/coders/yaml_column.rb:25:in `load'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/serialization.rb:24:in `unserialize'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/serialization.rb:15:in `unserialized_value'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/read.rb:82:in `__temp__'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/read.rb:46:in `type_cast_attribute'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/read.rb:126:in `read_attribute'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods.rb:183:in `block in attributes'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods.rb:183:in `each'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods.rb:183:in `map'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods.rb:183:in `attributes'
/Users/pupeno/Documents/watu/app/models/staffer.rb:151:in `index'
Trying to figure out what was going on, I opened a rails console and just got the first staffer, to encounter the same error:
1.9.2-p290 :019 > s = Staffer.first
Staffer Load (3.8ms) SELECT "users".* FROM "users" WHERE "users"."type" IN ('Staffer') LIMIT 1
TypeError: allocator undefined for Proc
from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:227:in `allocate'
from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:227:in `revive'
from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:183:in `visit_Psych_Nodes_Mapping'
from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/delayed_job-3.0.1/lib/delayed/psych_ext.rb:119:in `visit_Psych_Nodes_Mapping_with_class'
from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept'
from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `block in revive'
from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `map'
from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:228:in `revive'
from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:183:in `visit_Psych_Nodes_Mapping'
from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/delayed_job-3.0.1/lib/delayed/psych_ext.rb:119:in `visit_Psych_Nodes_Mapping_with_class'
from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept'
from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:116:in `block in visit_Psych_Nodes_Sequence'
from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:116:in `each'
from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:116:in `visit_Psych_Nodes_Sequence'
... 24 levels...
from /Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:107:in `load'
from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/coders/yaml_column.rb:25:in `load'
from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/serialization.rb:24:in `unserialize'
from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/serialization.rb:15:in `unserialized_value'
from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/read.rb:82:in `__temp__'
from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/read.rb:46:in `type_cast_attribute'
from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods/read.rb:126:in `read_attribute'
from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/attribute_methods.rb:200:in `attribute_for_inspect'
from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/base.rb:640:in `block in inspect'
from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/base.rb:638:in `collect'
from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activerecord-3.2.2/lib/active_record/base.rb:638:in `inspect'
from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/railties-3.2.2/lib/rails/commands/console.rb:47:in `start'
from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/railties-3.2.2/lib/rails/commands/console.rb:8:in `start'
from /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/railties-3.2.2/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
1.9.2-p290 :020 >
Do you have any yaml-serialized data in one of your staffer/user fields?
If so I think it has to do with the serialized data not with your code. Check to see if in your serialized data there's a serialized Proc object or so... That should be the reason why it can't load, cause somehow Procs can't be serialized!?
See this forum post.