Error :- down_retry_delay not reached for localhost:11211 (0.001 seconds left) down_retry_delay not reached for localhost:11211 (0.001 seconds left) down_retry_delay not reached for localhost:11211 (0.001 seconds left) down_retry_delay not reached for localhost:11211 (0.001 seconds left) [2012-03-20 15:08:28] ERROR NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.each /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.3.6/lib/rack/handler/webrick.rb:71:in `service' /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service' /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run' /usr/local/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread' cache: [GET /assets/kanga_custom/search_merchant.js?body=1] miss, store Dalli::Server#connect localh
Your EC2 box only contain .pem auth to enable password authentication follow the steps By default your ec2 box come with .pem authentication, once you create your user and password for that user you can’t able to login with that credentials because EC2 by default disables that functionality. Edit ssh config file by below command $ sudo vim /etc/ssh/sshd_config Search for PasswordAuthentication setting and setit to yes PasswordAuthentication yes Restart ssh server $sudo /etc/init.d/ssh reload
This will work for Rails 3.x onwords Model.skip_callback(“create”,:after,:trigger_my_method) in the above line ‘create’ and ‘after’ represents callback name so it represents ‘after_create’ callback, and the callback method is ‘trigger_my_method’, so totally the above line skips below callback after_create :trigger_my_method You can skip validations just by passing :validate => false as parameter to save method Model.save(:validate => false) As before skipping callback, you can reset same callback for reset by below ling Model.set_callback(“create”,:after,:trigger_my_method) This line will reset the below callback after_create :trigger_my_method Example:- Skip callback and validation and rest the skiped callback Post.skip_callback(“create”,:after,:trigger_my_method) post=Post.new(params[:post]) post.save(:validate => false) Post.set_callback(“create”,:after,:trigger_my_method)
Comments
Post a Comment