Home > The Error > The Error Occured While Evaluating Nil Each_hash

The Error Occured While Evaluating Nil Each_hash

class Attachment include IOStream def self.default_options @default_options ||= { :url => "/system/:attachment/:style/:thousand/:id/:filename", #"/system/:attachment/:id/:style/:filename", :path => ":rails_root/public:url", :styles => {}, :processors => [:thumbnail], :convert_options => {}, :default_url => "/:attachment/:style/missing.png", :default_style => :original, Join them; it only takes a minute: Sign up ruby - error occurred while evaluating nil.[]= … how to iterate thru multi-dimensional array up vote 0 down vote favorite I have woahdae commented Nov 10, 2011 see #224 With that, the app started bubbling up: Mysql2::Error: Lost connection to MySQL server during query Mysql docs say to get more info via --log-warnings=2 apache2 and mysql running on the same server. http://linuxprofilm.com/the-error/the-error-occured-while-evaluating-nil.html

cyrille commented Oct 14, 2010 I've the same issue with master ref 7169649 and Passenger 3 RC. Registration is free and takes only a minute. Just updated an app to rails 3.1 and the new paperclip. member sikachu commented Sep 23, 2011 Interesting. http://stackoverflow.com/questions/4380785/why-do-i-get-the-error-occurred-while-evaluating-nil-when-using-sort-by

before sorting to ensure you have no nil values in the array. You should set this, >> perhaps by having a form field in the previous view: <%= text_field >> "CourseSection", "section_name" %> >> >> Yours, >> Craig >> -- >> Craig Webster So after reading some info online, I set my mysql passwords with OLD_PASSWORD. Thank You! –Michael Durrant Jan 3 '12 at 22:07 btw is @my_ids_and_names[cid] = [ my_id, MyModel.find(my_id).internal_name ] the same as @my_ids_and_names{cid => MyModel.find(my_id).internal_name } and would that still work

Why is the FBI making such a big deal out Hillary Clinton's private email server? Owner brianmario commented Oct 6, 2010 I've been trying to reproduce this with no luck so far, could you guys give mysql2 master a try and see if it's any better? Also, I am not using the Rails.cache/memcache in my app currently, so I don't think it's related to that. Contact information - E-Mail: webmaster (at) ruby-forum (dot) com.

brianmario reopened this Jun 16, 2011 Owner brianmario commented Jun 16, 2011 Would you guys mind trying 0.2.8? Glad it's working so far, please let me know if any issues pop up cyrille commented Oct 18, 2010 Deployed 1 hour ago. rougecardinal commented Oct 5, 2010 Unfortunatly not... captainu commented Sep 29, 2010 I am having this issue with Passenger 3 beta in production env, so it is not Unicorn specific.

paulrosen commented Oct 12, 2010 Well, I moved away from mysql because of a utf-8 bug it had that mysql2 handles correctly. Thoughts? You should update your code to have that, or use Paperclip::Attachment.default_options.merge({ ... Brian Report post Edit Delete Reply with quote Forum List Topic List New Topic Search Register User List Log In Enable email notification | Enable multi-page view Please log in before

Upgraded to 3.0.3 48 hours ago, not having any issue at the moment. nir0 commented Sep 23, 2011 yeah, i know... From my very basic understanding of the C code, it looks like it supports returning nil sometimes; is this expected? thank you :) Owner brianmario commented Oct 19, 2010 awesome!

Already have an account? More about the author CourseSection is a hash in a hash, so by asking for @params['CourseSection']['section_number'] should I not recieve the value for section_number, being "153" in this case. Use the conn# in the error to check the query log to find what parts of your code that does not close threads properly. Only one query generates this error, though, so I tend to think it is also a bug in the adapter.

It should be default to a empty hash, not nil. captainu commented Sep 29, 2010 I get this too. /mysql2-0.2.4/lib/active_record/connection_adapters/mysql2_adapter.rb:628:in `select' It seems to happen randomly. Okay, let's clarify: do you want the section_name or the section_number? check my blog I don't understand how the before_exec stuff would be affecting this issue.

woahdae commented Nov 9, 2011 This problem is now technically occurring in ActiveRecord, since post-0.3.0 and Rails 3.1, AR now owns the Mysql2 connection adapter. When I forced a reconnect after forking, the problem has gone away (so far). woahdae commented Nov 16, 2011 Other ticket or not, I figured out my particular error is directly correlated with a mixed MyISAM and InnoDB environment, namely going to from an InnoDB-heavy

It happens about 1 in 4 times, which makes mysql2 unusable for me without the fix I posted above, since it's not feasible to have 1 in 4 requests fail in

I am more familiar with two dimensional arrays but I guess it's time to think more rubyish. Forum List Topic List New Topic Search Register User List Log In Powered by RForum and Captchator. Owner brianmario commented Oct 13, 2010 Try adding this in an initializer in your app: if defined?(PhusionPassenger) PhusionPassenger.on_event(:starting_worker_process) do |forked| if forked # We're in smart spawning mode. You signed out in another tab or window.

Also, try adding a @contacts.compact! I put back in the patch above where you reconnect if the select fails and everything seems to work for the moment. I've been having this bug a couple of time before finding the origin, but wasn't able to reproduce it. news Register here.