Jason Paluck
2011-Dec-03 02:31 UTC
"class Date needs to have method `_load''" in Rails 3.1.3 and Ruby 1.9.3-p0
Hi folks, I''ve got a Rails 3.0.10 app in production that I spent significant time upgrading to 3.1.3. It''s all running in development without any issues, but when I deploy to production and access any page I get the error "class Date needs to have method `_load''" with no associated page or line number. I''m running Ruby 1.9.3-p0 in both environments. Development is running on OSX, while production is running the most recent version of passenger(apache) on Ubuntu. Any thoughts? Thanks, Jason -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
botp
2011-Dec-03 03:23 UTC
Re: "class Date needs to have method `_load''" in Rails 3.1.3 and Ruby 1.9.3-p0
On Sat, Dec 3, 2011 at 10:31 AM, Jason Paluck <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I''ve got a Rails 3.0.10 app in production that I spent significant time > upgrading to 3.1.3. It''s all running in development without any issues, > but when I deploy to production and access any page I get the error > "class Date needs to have method `_load''" with no associated page or > line number. > I''m running Ruby 1.9.3-p0 in both environments. > Development is running on OSX, while production is running the most > recent version of passenger(apache) on Ubuntu.apparently, the app is not fully tested. you should have qa env that is similar to prodxn. like dev->qa->prod we need to get a dump of the error so we can help. see http://guides.rubyonrails.org/debugging_rails_applications.html <speculation> Klass + _load error usually occurs on Marshaled objects... marshall version is independent of ruby version, so be careful. ie an obj marshaled dump in v1 may not be properly marshaled load in v2... </speculation> kind regards -botp -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2011-Dec-03 09:27 UTC
Re: "class Date needs to have method `_load''" in Rails 3.1.3 and Ruby 1.9.3-p0
On 3 December 2011 02:31, Jason Paluck <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi folks, > > I''ve got a Rails 3.0.10 app in production that I spent significant time > upgrading to 3.1.3. It''s all running in development without any issues, > but when I deploy to production and access any page I get the error > "class Date needs to have method `_load''" with no associated page or > line number. > > I''m running Ruby 1.9.3-p0 in both environments. > > Development is running on OSX, while production is running the most > recent version of passenger(apache) on Ubuntu.First try running in production mode on the development machine. If that fails then the problem is due to running in production mode. If it is ok then possibly the versions of gems that you are using on the production machine are different so check that. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jason Paluck
2011-Dec-04 15:08 UTC
Re: "class Date needs to have method `_load''" in Rails 3.1.3 and Ruby 1.9.3-p0
I was able to resolve this issue after a lot of head scratching. Although I do have a staging environment and this code ran on both development and staging, it was still failing when I pushed to production. botp''s comments above gave me a great clue about marshaled objects across versions. Turns out my capistrano deploy recipe was calling "bundle install" with no flags in production. For whatever reason it had always worked. As soon as I changed to "bundle install --deployment" all was well again. Thanks, Jason -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.