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

NoMethodError (Attempt to call private method): #31

Open
ghost opened this issue Jun 3, 2011 · 4 comments
Open

NoMethodError (Attempt to call private method): #31

ghost opened this issue Jun 3, 2011 · 4 comments

Comments

@ghost
Copy link

ghost commented Jun 3, 2011

I'm getting the following error in my log file when I try to view a stage. The stage is created although immediately shows the "something went wrong error".

NoMethodError (Attempt to call private method):
vendor/bundler/ruby/1.9.1/gems/activerecord-2.3.11/lib/active_record/attribute_methods.rb:236:in method_missing' lib/webistrano/deployer.rb:25:ininitialize'
app/models/stage.rb:125:in new' app/models/stage.rb:125:inlist_tasks'
app/controllers/stages_controller.rb:17:in show' vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/base.rb:1333:inperform_action'
vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/filters.rb:617:in call_filters' vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/filters.rb:638:inblock in run_before_filters'
app/controllers/application_controller.rb:24:in set_timezone' vendor/bundler/ruby/1.9.1/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:178:inevaluate_method'
vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/filters.rb:186:in call' vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/filters.rb:635:inrun_before_filters'
vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/filters.rb:615:in call_filters' vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/filters.rb:610:inperform_action_with_filters'
vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/benchmarking.rb:68:in block in perform_action_with_benchmark' vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/benchmarking.rb:68:inperform_action_with_benchmark'
vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/rescue.rb:160:in perform_action_with_rescue' vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/flash.rb:151:inperform_action_with_flash'
vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/base.rb:532:in process' vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/filters.rb:606:inprocess_with_filters'
vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/base.rb:391:in process' vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/base.rb:386:incall'
vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/routing/route_set.rb:438:in call' vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:87:indispatch'
vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:121:in _call' vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:130:inblock in build_middleware_stack'
vendor/bundler/ruby/1.9.1/gems/activerecord-2.3.11/lib/active_record/query_cache.rb:29:in call' vendor/bundler/ruby/1.9.1/gems/activerecord-2.3.11/lib/active_record/query_cache.rb:29:inblock in call'
vendor/bundler/ruby/1.9.1/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in cache' vendor/bundler/ruby/1.9.1/gems/activerecord-2.3.11/lib/active_record/query_cache.rb:9:incache'
vendor/bundler/ruby/1.9.1/gems/activerecord-2.3.11/lib/active_record/query_cache.rb:28:in call' vendor/bundler/ruby/1.9.1/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:incall'
vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/string_coercion.rb:25:in call' vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/params_parser.rb:15:incall'
vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/session/cookie_store.rb:99:in call' vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/failsafe.rb:26:incall'
internal:prelude:10:in synchronize' vendor/bundler/ruby/1.9.1/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:106:incall'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/rack/request_handler.rb:96:in process_request' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/abstract_request_handler.rb:513:inaccept_and_process_next_request'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/abstract_request_handler.rb:274:in main_loop' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/classic_rails/application_spawner.rb:321:instart_request_handler'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in block in handle_spawn_application' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/utils.rb:479:insafe_fork'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/classic_rails/application_spawner.rb:270:in handle_spawn_application' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:357:inserver_main_loop'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:206:in start_synchronously' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:180:instart'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/classic_rails/application_spawner.rb:149:in start' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb:219:inblock (2 levels) in spawn_rails_application'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server_collection.rb:132:in lookup_or_add' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb:214:inblock in spawn_rails_application'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server_collection.rb:82:in block in synchronize' <internal:prelude>:10:insynchronize'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server_collection.rb:79:in synchronize' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb:213:inspawn_rails_application'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb:132:in spawn_application' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb:275:inhandle_spawn_application'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:357:in server_main_loop' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:206:instart_synchronously'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/helper-scripts/passenger-spawn-server:99:in `

'

Any help would be greatly appreciated!

@rrouse
Copy link

rrouse commented Jun 6, 2011

This is happening because somehow, Rake's task method is getting pulled in. Hopefully a fix will come up soon.

Easiest way to reproduce:

script/console

d = Deployment.new
d.task

To get it to stop erroring, you can add to the deployment model

def task
   self.read_attribute(:task)
end

@rrouse
Copy link

rrouse commented Jun 6, 2011

One of the forks fixed this issue a different way.

https://github.com/kosmas58/webistrano/commit/5b7ec4b8c9de9143972b08b347500a9c3e9e77e7

@chandranshu12
Copy link

I'm getting this problem too. I have moved to using the fix from kosmas58.

@chandranshu12
Copy link

I'm facing this issue too. I think I'll use the fix from kosmas58.

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

No branches or pull requests

2 participants