Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

NoMethodError (undefined method `utc' for "UTC":String)

#6518

I'm not sure what the hell went wrong but I used rvm to test my app under ruby 1.9.2 because it was taking forever to respond to http requests under Rails 3 in development under 1.8.7. I discovered that there was a pre version of mongrel (1.2.0.pre2), updated that, and it fixed the issue.

I changed rvm back to default (1.8.7) and installed the latest mongrel pre version. I updated my Gemfile and ran "bundle install" and after that things started breaking. Bundler wanted to install all the gems into a gem directory called calendar_date_select (which was one of my gems in the Gemfile). After I found the .bundler/config file which had a setting for the bundle directory pointing to calendar_date_select (what? how'd that happen?) and deleted it and was able to update the gem bundle and start the server under the new mongrel.

As soon as I hit the app with the web browser I got the error. Ok, so maybe this mongrel version isn't compatible so I reverted back to 1.1.5 and the problem still persists. Aside from the original issue it was all working before using rvm so I figure there must be something I've done wrong and there may be a bug as well. I'm stumped!

The entire exception is below.

Thanks,

Chris

Started GET "/" for 127.0.0.1 at Fri Mar 04 00:55:54 -0800 2011

NoMethodError (undefined method utc' for "UTC":String): activesupport (3.0.5) lib/active_support/time_with_zone.rb:304:inmarshal_load' activesupport (3.0.5) lib/active_support/message_verifier.rb:34:in load' activesupport (3.0.5) lib/active_support/message_verifier.rb:34:inverify' actionpack (3.0.5) lib/action_dispatch/middleware/cookies.rb:253:in []' actionpack (3.0.5) lib/action_dispatch/middleware/session/cookie_store.rb:68:inunpacked_cookie_data' actionpack (3.0.5) lib/action_dispatch/middleware/session/abstract_store.rb:223:in stale_session_check!' actionpack (3.0.5) lib/action_dispatch/middleware/session/cookie_store.rb:66:inunpacked_cookie_data' actionpack (3.0.5) lib/action_dispatch/middleware/session/cookie_store.rb:57:in extract_session_id' actionpack (3.0.5) lib/action_dispatch/middleware/session/abstract_store.rb:39:insend' actionpack (3.0.5) lib/action_dispatch/middleware/session/abstract_store.rb:39:in load_session_id!' actionpack (3.0.5) lib/action_dispatch/middleware/session/abstract_store.rb:27:in[]' actionpack (3.0.5) lib/action_dispatch/middleware/session/abstract_store.rb:210:in current_session_id' actionpack (3.0.5) lib/action_dispatch/middleware/session/abstract_store.rb:239:inexists?' actionpack (3.0.5) lib/action_dispatch/middleware/session/abstract_store.rb:96:in send' actionpack (3.0.5) lib/action_dispatch/middleware/session/abstract_store.rb:96:inexists?' actionpack (3.0.5) lib/action_dispatch/middleware/session/abstract_store.rb:113:in load_for_read!' actionpack (3.0.5) lib/action_dispatch/middleware/session/abstract_store.rb:53:in[]' actionpack (3.0.5) lib/action_dispatch/middleware/flash.rb:178:in call' actionpack (3.0.5) lib/action_dispatch/middleware/session/abstract_store.rb:149:incall' actionpack (3.0.5) lib/action_dispatch/middleware/cookies.rb:302:in call' activerecord (3.0.5) lib/active_record/query_cache.rb:32:incall' activerecord (3.0.5) lib/active_record/connection_adapters/abstract/query_cache.rb:28:in cache' activerecord (3.0.5) lib/active_record/query_cache.rb:12:incache' activerecord (3.0.5) lib/active_record/query_cache.rb:31:in call' activerecord (3.0.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:354:incall' actionpack (3.0.5) lib/action_dispatch/middleware/callbacks.rb:46:in call' activesupport (3.0.5) lib/active_support/callbacks.rb:415:in_run_call_callbacks' actionpack (3.0.5) lib/action_dispatch/middleware/callbacks.rb:44:in call' rack (1.2.1) lib/rack/sendfile.rb:107:incall' actionpack (3.0.5) lib/action_dispatch/middleware/remote_ip.rb:48:in call' actionpack (3.0.5) lib/action_dispatch/middleware/show_exceptions.rb:47:incall' railties (3.0.5) lib/rails/rack/logger.rb:13:in call' rack (1.2.1) lib/rack/runtime.rb:17:incall' activesupport (3.0.5) lib/active_support/cache/strategy/local_cache.rb:72:in call' rack (1.2.1) lib/rack/lock.rb:11:incall' rack (1.2.1) lib/rack/lock.rb:11:in synchronize' rack (1.2.1) lib/rack/lock.rb:11:incall' actionpack (3.0.5) lib/action_dispatch/middleware/static.rb:30:in call' railties (3.0.5) lib/rails/application.rb:168:incall' railties (3.0.5) lib/rails/application.rb:77:in send' railties (3.0.5) lib/rails/application.rb:77:inmethod_missing' railties (3.0.5) lib/rails/rack/log_tailer.rb:14:in call' rack (1.2.1) lib/rack/content_length.rb:13:incall' rack (1.2.1) lib/rack/chunked.rb:15:in call' rack (1.2.1) lib/rack/handler/mongrel.rb:67:inprocess' mongrel (1.1.5) lib/mongrel.rb:159:in process_client' mongrel (1.1.5) lib/mongrel.rb:158:ineach' mongrel (1.1.5) lib/mongrel.rb:158:in process_client' mongrel (1.1.5) lib/mongrel.rb:285:inrun' mongrel (1.1.5) lib/mongrel.rb:285:in initialize' mongrel (1.1.5) lib/mongrel.rb:285:innew' mongrel (1.1.5) lib/mongrel.rb:285:in run' mongrel (1.1.5) lib/mongrel.rb:268:ininitialize' mongrel (1.1.5) lib/mongrel.rb:268:in new' mongrel (1.1.5) lib/mongrel.rb:268:inrun' rack (1.2.1) lib/rack/handler/mongrel.rb:38:in run' rack (1.2.1) lib/rack/server.rb:213:instart' railties (3.0.5) lib/rails/commands/server.rb:65:in start' railties (3.0.5) lib/rails/commands.rb:30 railties (3.0.5) lib/rails/commands.rb:27:intap' railties (3.0.5) lib/rails/commands.rb:27 script/rails:6:in `require' script/rails:6

Reported by Chris Anderson · March 4th, 2011 @ 09:17 AM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Andrew White
    Andrew White
    • Importance changed from to Low

    What happens if you clear your cookies?

    March 4th, 2011 @ 11:07 AM

  2. Chris Anderson
    Chris Anderson

    Well, I'm not sure why that worked but it did. To my knowledge I'm not using cookies as I use db session store. What cookie is Rails 3 storing?

    Now that's that out of the way I can try and tackle why my dev environment is taking 10 seconds to return any response from my local mongrel, or webrick and I even tried passenger. Nothing appears in the log at all until 10 seconds later.

    My app is updated from 2.3.8 so I'm at a loss as what could be causing this huge delay. Is it really ruby 1.8.7?

    Thanks!

    March 4th, 2011 @ 04:00 PM

  3. Andrew White
    Andrew White
    • State changed from new to invalid

    Even when using a db session store the session id will still be stored in a cookie.

    March 5th, 2011 @ 07:08 PM