本文介绍了设计问题:TypeError - [17]不是一个符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我最近运行了一个软件包更新,现在我有一个奇怪的 类型 - [17]不是符号错误。 这是完整的错误消息: 在2013-05-14 03:46:35 -0500 TypeError - [17]中为127.0.0.1启动GET/不是一个符号:(gem)activesupport-3.2.13 / lib / active_support / inflector / methods.rb:230:在`block in constantize'(gem)activesupport-3.2.13 / lib / active_support / inflector / methods.rb:229:在`constantize'(gem)devise-2.2.3 / lib / devise / rails / warden_compat.rb:27:在`deserialize'(gem) warden-1.2.1 / lib / warden / session_serializer.rb:35:在`fetch'(gem)warden-1.2.1 / lib / warden / proxy.rb:212:在`user'(gem)warden-1.2.1 / lib / warden / proxy.rb:318:在`_perform_authentication'(gem)warden-1.2.1 / lib / warden / proxy.rb:104:在`authenticate '(gem)warden-1.2.1 / lib / warden / proxy.rb:114:在`authenticate?'(gem)devise-2.2.3 / lib / de vise / rails / routes.rb:286:在已验证的块(gem)actionpack-3.2.13 / lib / action_dispatch / routing / mapper.rb:31:在`block in matches?'(gem)actionpack-3.2.13 / lib / action_dispatch / routing / mapper.rb:28:in`matches?'(gem)actionpack-3.2.13 / lib / action_dispatch / routing / mapper.rb :42:在`call'(gem)journey-1.0.4 / lib / journey / router.rb:68:在`block in call'(gem)journey-1.0.4 / lib /journey/router.rb:56:in`call'(gem)actionpack-3.2.13 / lib / action_dispatch / routing / route_set.rb:612:在`call'(gem) -pjax-0.7.0 / lib / rack / pjax.rb:12:在`call'(gem)newrelic_rpm-3.6.1.88 / lib / new_relic / rack / error_collector.rb:12: (gem)newrelic_rpm-3.6.1.88 / lib / new_relic / rack / agent_hooks.rb:18:在`call'(gem)newrelic_rpm-3.6.1.88 / lib / new_relic / rack / browser_monitoring中。 rb:16:在`call'(gem)bullet-4.6.0 / lib / bullet / rack.rb:10:在`call'(gem)meta_request-0.2.3 / lib / meta_request /中间件/ app_re quest_handler.rb:11:在`call'(gem)rack-contrib-1.1.0 / lib / rack / contrib / response_headers.rb:17:在`call'(gem)meta_request- 0.2.3 / lib / meta_request / middlewares / headers.rb:16:in`call'(gem)meta_request-0.2.3 / lib / meta_request / middlewares / meta_request_handler.rb:13:在`call'(gem)warden-1.2.1 / lib / warden / manager.rb:35:在`block in call'(gem)warden-1.2.1 / lib / warden / manager.rb:34 :在`call'(gem)actionpack-3.2.13 / lib / action_dispatch / middleware / best_standards_support.rb:17:在`call'(gem)rack-1.4.5 / lib / rack /etag.rb:23:in`call'(gem)rack-1.4.5 / lib / rack / conditionalget.rb:25:在`call'(gem)actionpack-3.2.13 /lib/action_dispatch/middleware/head.rb:14:in`call'(gem)remotipart-1.0.5 / lib / remotipart / middleware.rb:30:在`call'(gem )actionpack-3.2.13 / lib / action_dispatch / middleware / params_parser.rb:21:in`call'(gem)actionpack-3.2.13 / lib / action_dispatch / middleware / flash.rb:242:in`呼叫(gem)rack-1.4.5 / lib / rack / session / abstract / id.rb:210:在`context'(gem)rack-1.4.5 / lib / rack / session / abstract / id.rb:205:在`call'(gem)actionpack-3.2.13 / lib / action_dispatch / middleware / cookies.rb:341:在`call'(gem)activerecord- 3.2.13 / lib / active_record / query_cache.rb:64:在`call'(gem)activerecord-3.2.13 / lib / active_record / connection_adapters / abstract / connection_pool.rb:479:在`call'(gem)actionpack-3.2.13 / lib / action_dispatch / middleware / callbacks.rb:28:在`block in call'(gem)activesupport-3.2.13 / lib / active_support / callbacks.rb :405:在`_run__1566733404690363964__call__3169664716453937753__callbacks'(gem)activesupport-3.2.13 / lib / active_support / callbacks.rb:405:在`__run_callback'(gem)activesupport-3.2.13 / lib / active_support /callbacks.rb:385:in`_run_call_callbacks'(gem)activesupport-3.2.13 / lib / active_support / callbacks.rb:81:在`run_callbacks'(gem)actionpack-3.2.13 / lib目录/ action_disp atch / middleware / callbacks.rb:27:在`call'(gem)actionpack-3.2.13 / lib / action_dispatch / middleware / reloader.rb:65:在`call'(gem) actionpack-3.2.13 / lib / action_dispatch / middleware / remote_ip.rb:31:在`call'(gem)better_errors-0.8.0 / lib / better_errors / middleware.rb:84:在`protected_app_call'(gem)better_errors-0.8.0 / lib / better_errors / middleware.rb:79:在`better_errors_call'(gem)better_errors-0.8.0 / lib / better_errors / middleware.rb:56:in `call'(gem)actionpack-3.2.13 / lib / action_dispatch / middleware / debug_exceptions.rb:16:in`call'(gem)actionpack-3.2.13 / lib / action_dispatch / middleware /show_exceptions.rb:56:in`call'(gem)railties-3.2.13 / lib / rails / rack / logger.rb:32:在`call_app'(gem)railties-3.2 .13 / lib / rails / rack / logger.rb:16:在`block in call'(gem)activesupport-3.2.13 / lib / active_support / tagged_logging.rb:22:在`tagged'(gem)railties-3.2.13 / lib / rails / rack / logger.rb:16:在`call' gem)quiet_assets-1.0.2 / lib / quiet_assets.rb:18:在`call_with_quiet_assets'(gem)actionpack-3.2.13 / lib / action_dispatch / middleware / request_id.rb:22:在`call'(gem)rack-1.4.5 / lib / rack / methodoverride.rb:21:在`call'(gem)rack-1.4.5 / lib / rack / runtime.rb:17:in `call'(gem)activesupport-3.2.13 / lib / active_support / cache / strategy / local_cache.rb:72:在`call'(gem)rack-1.4.5 / lib / rack /lock.rb:15:in`call'(gem)actionpack-3.2.13 / lib / action_dispatch / middleware / static.rb:63:在`call'(gem)railties-3.2 .13 / lib / rails / engine.rb:479:在`call'(gem)railties-3.2.13 / lib / rails / application.rb:223:在`call' )rack-1.4.5 / lib / rack / content_length.rb:14:在`call'(gem)railties-3.2.13 / lib / rails / rack / log_tailer.rb:17:在`call' (gem)thin-1.5.1 / lib / thin / connection.rb:81:in'block in pre_process'(gem)thin-1.5.1 / lib / thin / connection.rb: 79:在`pre_process'(gem)thin-1.5.1 / lib / thin / connection.r b:54:在'process'(gem)thin-1.5.1 / lib / thin / connection.rb:39:在`receive_data'(gem)eventmachine-1.0.3 / lib / eventmachine.rb:187:在`run'(gem)thin-1.5.1 / lib / thin / backends / base.rb:63:在`start'(gem)thin-1.5。 1 / lib / thin / server.rb:159:在`start'(gem)rack-1.4.5 / lib / rack / handler / thin.rb:13:在`run' gem)rack-1.4.5 / lib / rack / server.rb:268:在`start'(gem)railties-3.2.13 / lib / rails / commands / server.rb:70:在`start '(gem)railties-3.2.13 / lib / rails / commands.rb:55:在`block in< top(required)>'(gem)railties-3.2.13 / lib / rails / commands.rb:50:在`< top(required)>' script / rails:6:在`< main>' / pre> 我完全失去了什么可能导致这一切突然。 不知道这是否会有帮助,但这是我的 Gemfile.lock : GIT remote:git://github.com/ctran/annotate_models.git revis离子:8bd159c7a484093fde84beaa9e6398f25ddacf09 规格:注释(2.6.0.beta1) activerecord(> = 2.3.0) rake(> = 0.8.7) GEM remote:https://rubygems.org/ 规格: actionmailer(3.2.13) actionpack(= 3.2.13)邮件(〜> 2.5.3) actionpack(3.2.13) activemodel(= 3.2.13) activesupport(= 3.2.13) builder(〜> 3.0.0) erubis(〜> 2.7.0)旅程(〜> 1.0.4)机架(〜> 1.4.5)机架缓存(〜> 1.2 )机架测试(〜> 0.6.1)链轮(〜> 2.2.1) active_utils(1.0.5) activesupport(> = 2.3。 i18n activemerchant(1.32.1) active_utils(> = 1.0.2) activesupport(> = 2.3.14) builder(> ; = 2.0.0) i18n json(> = 1.5.1) money nokogiri activemodel(3.2.13) activesupport = 3.2.13) builder(〜> 3.0.0) activerecord(3.2.13) activemodel(= 3.2.13) activesupport(= 3.2.13) arel(〜> 3.0.2) tzinfo(〜> 0.3.29) activeresource(3.2.13) activemodel(= 3.2.13) activesu pport(= 3.2.13) activesupport(3.2.13) i18n(= 0.6.1) multi_json(〜> 1.0)作为标签的(2.4.1) rails(> = 3,< 5)可寻址(2.3.4) arel(3.0 autoparse(0.3.3)可寻址(> = 2.3.1) extlib(> = 0.9.15) multi_json(> = 1.0。 0) bcrypt-ruby(3.0.1) better_errors(0.8.0) coderay(> = 1.0.0) erubis(> = 2.6.6) binding_of_caller(0.7.1) debug_inspector(> = 0.0.1) bootstrap-sass(2.3.1.0) sass(〜> 3.2) bootstrap-wysihtml5-rails(0.3.1.19) railties(> = 3.0) builder(3.0.4) bullet(4.6.0) uniform_notifier cancan(1.6.9)载波(0.8.0) activemodel(> = 3.2.0) activesupport(> = 3.2.0) coderay(1.0。 9)咖啡轨道(3.2.2)咖啡脚本(> = 2.2.0)轨道(〜> 3.2.0)咖啡脚本2.2.0) coffee-script-source execjs 咖啡脚本源(1.6.2)国家(0.9.2)货币(> = 0.4.0)货币(0.4.0 )守护进程(1.1.9) database_cleaner(1.0.0.RC1) debug_inspector(0.0.2) devise(2.2.3) bcrypt-ruby (〜> 3.0) orm_adapter(〜> 0.1) railties(〜> 3.1) warden(〜> 1.2.1) diff-lcs(1.2.4) email_spec(1.4.0) launchy(〜> 2.1)邮件(〜> 2.2) erubis(2.7.0) eventmachine(1.0.3 ) excon(0.21.0) execjs(1.4.0) multi_json(〜> 1.0) extlib(0.9.16)法拉第(0.8。 7) multipart-post(〜> 1.1) fog(1.11.0) builder excon(〜> 0.20) formatador(〜> 0.2.0) google-api-client(〜> 0.6.2) json(〜> 1.7) mime-types net-scp(〜> 1.1) net-ssh(> = 2.1.3) nokogiri(〜> 1.5.0) ruby​​-hmac font-awesome-sass-rails $2 $($) $ b $($)$($) $ ) google-api-client(0.6.3)可寻址(> = 2.3.2 ) autoparse(> = 0.3.3) extlib(> = 0.9.15)法拉第(〜> 0.8.4) jwt(> = 0.1.5) launchy(> = 2.1.1) multi_json(> = 1.0.0) signet(> ; = 0.4.4) uuidtools(> = 2.1.0) haml(4.0.2) tilt 远足(1.2.2) i18n( 0.6.1)旅程(1.0.4) jquery-rails(2.2.1) railties(> = 3.0,< 5.0) thor(> = 0.14,< 2.0) jquery-ui-rails(3.0.1) jquery-rails railties(> = 3.1.0) json(1.7.7) jwt(0.1.8) multi_json(> = 1.5) kaminari(0.14.1) actionpack(> = 3.0.0) activesupport > = 3.0.0) launchy(2.3.0)可寻址(〜> 2.3) letter_opener(1.0.0) launchy(> = 2.0.4 ) libv8(3.11.8.17) mail(2.5.3) i18n(> = 0.4.0) mime-types(〜> 1.16)树顶(〜> 1.4.8) meta_request(0.2.3) rack-contrib rail关系 mime-types(1.23) mini_magick(3.5.0) subexec(〜> 0.2.1)钱(5.1.1) i18n(〜> 0.6.0) multi_json(1.7.2) multipart-post(1.2.0) nested_form(0.3.2) net-scp(1.1.0) net-ssh(> = 2.6.5) net-ssh(2.6.7) newrelic_rpm(3.6.1.88) nokogiri(1.5.9) orm_adapter(0.4.0) pg(0.15.1) piggybak(0.6.30) activemerchant 国家 devise rack-ssl-enforcecer rails(〜> 3.2.8) rails_admin(〜> 0.4.5) piggybak_bundle_discounts(0.0.5) rails(〜> 3.2.8) piggybak_stripe(0.0.2)条纹(= 1.7.4) piggybak_variants(0.0。 17) rails(〜> 3.2.3) polyglot(0.3.3) quiet_assets(1.0.2) railties(> = 3.1,机架(1.4.5)机架缓存(1.2)机架(> = 0.4)机架式(1.1.0)机架; = 0.9.1) rack-pjax(0.7.0) nokogiri(〜> 1.5)机架(〜> 1.3) rack-ssl(1.3.3)机架机架执行器(0.2.5) rack- test(0.6.2) rack(> = 1.0) rails(3.2.13) actionmailer(= 3.2.13) actionpack(= 3.2.13) activerecord(= 3.2.13) activeresource(= 3.2.13) activesupport(= 3.2.13) bundler(〜> 1.0) railties(= 3.2.13) rails_admin(0.4.7) bootstrap-sass(〜> 2.2) builder(〜> 3.0) coffee-rails(〜> 3.1 ) font-awesome-sass-rails(〜> 3.0,> = 3.0.0.1) haml(〜> 4.0) jquery-rails(〜> 2.1) jquery-ui-rails(〜> 3.0) kaminari(〜> 0.14) nested_form(〜> 0.3) rack-pjax(〜> b $ b rails(〜> 3.1) remotipart(〜> 1.0) safe_yaml(〜> 0.6) sass-rails(〜> 3.1) railties (3.2.13) actio npack(= 3.2.13) activesupport(= 3.2.13) rack-ssl(〜> 1.3.2) rake(> = 0.8.7) rdoc(〜> 3.4) thor(> = 0.14.6, rake (10.0.4) rdoc(3.12.2) json(〜> 1.4) ref(1.0.4) remotipart(1.0.5) rest-client(1.6.7) mime-types(> = 1.16) rmagick(2.13.2) rolify(3.2.0) rspec-core(2.13 .1) rspec-expectations(2.13.0) diff-lcs(> = 1.1.3,< 2.0) rspec-mocks(2.13.1) rspec-rails(2.13.1) actionpack(> = 3.0) activesupport(> = 3.0) railties(> = 3.0) rspec-core > 2.13.0) rspec-expectations(〜> 2.13.0) rspec-mocks(〜> 2.13.0) ruby​​-hmac(0.4.0) safe_yaml(0.9.1) sass(3.2.8) sass-rails(3.2.6) railties(〜> 3.2.0) sass(> ; = 3.1.10) tilt(〜> 1.3) sendgrid(1.1.0) json json (0.2.3) activesupport(> = 3.2) rails(> = 3.2) signet(0.4.5)可寻址(> = 2.2.3 )法拉第(〜> 0.8.1) jwt(> = 0.1.5) multi_json(> = 1.0.0) simple_form(2.1.0) actionpack(〜> 3.0 ) activemodel(〜> 3.0)链轮(2.2.2)远足(〜> 1.2) multi_json(〜> 1.0) rack 〜> 1.0) tilt(〜> 1.1,!= 1.3.0)条纹(1.7.4) multi_json(〜> 1.1) rest-client (〜> 1.4) subexec(0.2.3) therubyracer(0.11.4) libv8(〜> 3.11.8.12) ref thin 1.5.1)守护进程(> = 1.0.9) eventmachine(> = 0.12.6)机架(> = 1.0.0) thor(0.18 .1) tilt(1.4.0) treetop(1.4.12) polyglot polyglot(> = 0.3.1) tzinfo(0.3.37 ) uglifier(2.0.1) execjs(> = 0.3.0) multi_json(〜> 1.0,> = 1.0.2) uniform_notifier(1.2。 0) uuidtools(2.1.4) warden(1.2.1)r ack(> = 1.0) PLATFORMS ruby​​ DEPENDENCIES 以作为标记的$注释! better_errors(> = 0.7.2) binding_of_caller(> = 0.7.1) bootstrap-sass(> = 2.3.0.0) bootstrap-wysihtml5-rails bullet cancan(> = 1.6.9) carrierwave coffee-rails(〜> 3.2.1) database_cleaner(> = 1.0.0 .RC1) devise(> = 2.2.3) email_spec(> = 1.4.0) execjs fog font-awesome-sass-rails friendly_id jquery-rails letter_opener meta_request mini_magick newrelic_rpm pg(> = 0.15.0) piggybak piggybak_bundle_discounts piggybak_stripe piggybak_variants quiet_assets(> = 1.0.2) rails(= 3.2.13) rails_admin rmagick rolify(> = 3.2.0) rspec-rails(> = 2.12.2) sass-rails(〜> 3.2.3) sendgrid(> = 1.0.1) sextant simple_form(> = 2.1.0) therubyracer thin(> = 1.5.0) uglifier(> = 1.0.3) 编辑1 这是我的 Gemfile : 源'https://rubygems.org' gem'rails',' 3.2.13' group:assets do gem'sass-rails','〜> 3.2.3' gem'coffee-rails','〜> 3.2.1' gem'uglifier','> = 1.0.3' end group:development do gem'annotate',,git = > 'git://github.com/ctran/annotate_models.git' gem'sextant' gemquiet_assets,> = 1.0.2 gembetter_errors, > = 0.7.2 gembinding_of_caller,> = 0.7.1 gem'meta_request' gem'execjs' gem'therubyracer' gemletter_opener gem'bullet'#gem'rack-mini-profiler' end group:test do gem $ _ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ do do do do do do do do do do do do do do do do do do do do do gemrspec-rails,> = 2.12.2 end gem'jquery-rails' gemthin,> = 1.5.0 gempg,> = 0.15.0 gemfont-awesome-sass-rails gembootstrap-sass,> gembootstrap-wysihtml5-rails gembootstrap-sass,> = 2.3.0.0 gemsendgrid,> = 1.0 gemdevise,> = 2.2.3 gemcancan,> = 1.6.9 gemrolify,> = 3。 2.0 gemsimple_form,> = 2.1.0 gemnewrelic_rpm gemrmagick gemmini_magick gem 宝石$宝石piggybak宝石piggybak_variants宝石piggybak_bundle_discounts宝石rails_admin宝石 -taggable-on gemfriendly_id gempiggybak_stripe 解决方案这里需要注意以下几点: 指定要更新的最大版本更安全在您的宝石文件中 您的会话未正确反序列化,这是您看到的例外原因 如果您遇到问题一个宝石,需要更新,使用 bundle update< gem name> 指定最高宝石版本 您应该了解使用〜> 操作符)。这基本上允许你说,宝石只能更新到更高的补丁级别。 Ruby开发人员倾向于使用三个版本号的标准: xxx ,例如 2.0.1 。第一个数字是主要版本,第二个数字是次要版本,第三个数字是补丁。 主要版本更新可能会破坏旧功能。如果您从 1.x.x 升级到 2.x.x ,那可能是一个痛苦的过程。次要版本更新应添加功能,在极少数情况下会更改现有功能,但应向后兼容。补丁级更新应该是纯粹的错误修复。 悲观版本约束可以用来说只允许修补程序级更新。例如: gem'devise','〜> 2.2.3'#只有'.3'可以增加,例如2.2.4,2.2.5 如果你为所有的宝石做这个,那么你可以合理地确保 bundle update 将更新宝石到兼容版本。在您的Gemfile中,您有 gem'devise','> = 2.2.3' 这将有可能允许安装devise 3.0.0 ,您几乎可以保证会有问题。 / p> 找到一个可以工作的gem配置是很好的做法,然后使用悲观版本约束将Gemfile锁定到仅限于修补程序级更新。 会话反序列化 看起来设计已经更新,这导致了一个会话反序列化问题。您可以查看旧版本的 Gemfile.lock ,然后降级到正在使用的设计版本。或者您可以清除缓存,如果您在会话中没有任何重要内容并使用新版本。 更新单个gem 运行 bundle update 将尝试更新Gemfile中的所有宝石。如果您只需要更新单个宝石,请使用 bundle update< gem name> 。所有其他人将保持在相同的版本。 I recently ran a bundle update and now I am getting a weirdType - [17] is not a symbol error.This is the full error message:Started GET "/" for 127.0.0.1 at 2013-05-14 03:46:35 -0500TypeError - [17] is not a symbol: (gem) activesupport-3.2.13/lib/active_support/inflector/methods.rb:230:in `block in constantize' (gem) activesupport-3.2.13/lib/active_support/inflector/methods.rb:229:in `constantize' (gem) devise-2.2.3/lib/devise/rails/warden_compat.rb:27:in `deserialize' (gem) warden-1.2.1/lib/warden/session_serializer.rb:35:in `fetch' (gem) warden-1.2.1/lib/warden/proxy.rb:212:in `user' (gem) warden-1.2.1/lib/warden/proxy.rb:318:in `_perform_authentication' (gem) warden-1.2.1/lib/warden/proxy.rb:104:in `authenticate' (gem) warden-1.2.1/lib/warden/proxy.rb:114:in `authenticate?' (gem) devise-2.2.3/lib/devise/rails/routes.rb:286:in `block in authenticated' (gem) actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:31:in `block in matches?' (gem) actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:28:in `matches?' (gem) actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:42:in `call' (gem) journey-1.0.4/lib/journey/router.rb:68:in `block in call' (gem) journey-1.0.4/lib/journey/router.rb:56:in `call' (gem) actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:612:in `call' (gem) rack-pjax-0.7.0/lib/rack/pjax.rb:12:in `call' (gem) newrelic_rpm-3.6.1.88/lib/new_relic/rack/error_collector.rb:12:in `call' (gem) newrelic_rpm-3.6.1.88/lib/new_relic/rack/agent_hooks.rb:18:in `call' (gem) newrelic_rpm-3.6.1.88/lib/new_relic/rack/browser_monitoring.rb:16:in `call' (gem) bullet-4.6.0/lib/bullet/rack.rb:10:in `call' (gem) meta_request-0.2.3/lib/meta_request/middlewares/app_request_handler.rb:11:in `call' (gem) rack-contrib-1.1.0/lib/rack/contrib/response_headers.rb:17:in `call' (gem) meta_request-0.2.3/lib/meta_request/middlewares/headers.rb:16:in `call' (gem) meta_request-0.2.3/lib/meta_request/middlewares/meta_request_handler.rb:13:in `call' (gem) warden-1.2.1/lib/warden/manager.rb:35:in `block in call' (gem) warden-1.2.1/lib/warden/manager.rb:34:in `call' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' (gem) rack-1.4.5/lib/rack/etag.rb:23:in `call' (gem) rack-1.4.5/lib/rack/conditionalget.rb:25:in `call' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/head.rb:14:in `call' (gem) remotipart-1.0.5/lib/remotipart/middleware.rb:30:in `call' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/params_parser.rb:21:in `call' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/flash.rb:242:in `call' (gem) rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context' (gem) rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/cookies.rb:341:in `call' (gem) activerecord-3.2.13/lib/active_record/query_cache.rb:64:in `call' (gem) activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' (gem) activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `_run__1566733404690363964__call__3169664716453937753__callbacks' (gem) activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `__run_callback' (gem) activesupport-3.2.13/lib/active_support/callbacks.rb:385:in `_run_call_callbacks' (gem) activesupport-3.2.13/lib/active_support/callbacks.rb:81:in `run_callbacks' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/callbacks.rb:27:in `call' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/reloader.rb:65:in `call' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/remote_ip.rb:31:in `call' (gem) better_errors-0.8.0/lib/better_errors/middleware.rb:84:in `protected_app_call' (gem) better_errors-0.8.0/lib/better_errors/middleware.rb:79:in `better_errors_call' (gem) better_errors-0.8.0/lib/better_errors/middleware.rb:56:in `call' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' (gem) railties-3.2.13/lib/rails/rack/logger.rb:32:in `call_app' (gem) railties-3.2.13/lib/rails/rack/logger.rb:16:in `block in call' (gem) activesupport-3.2.13/lib/active_support/tagged_logging.rb:22:in `tagged' (gem) railties-3.2.13/lib/rails/rack/logger.rb:16:in `call' (gem) quiet_assets-1.0.2/lib/quiet_assets.rb:18:in `call_with_quiet_assets' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/request_id.rb:22:in `call' (gem) rack-1.4.5/lib/rack/methodoverride.rb:21:in `call' (gem) rack-1.4.5/lib/rack/runtime.rb:17:in `call' (gem) activesupport-3.2.13/lib/active_support/cache/strategy/local_cache.rb:72:in `call' (gem) rack-1.4.5/lib/rack/lock.rb:15:in `call' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/static.rb:63:in `call' (gem) railties-3.2.13/lib/rails/engine.rb:479:in `call' (gem) railties-3.2.13/lib/rails/application.rb:223:in `call' (gem) rack-1.4.5/lib/rack/content_length.rb:14:in `call' (gem) railties-3.2.13/lib/rails/rack/log_tailer.rb:17:in `call' (gem) thin-1.5.1/lib/thin/connection.rb:81:in `block in pre_process' (gem) thin-1.5.1/lib/thin/connection.rb:79:in `pre_process' (gem) thin-1.5.1/lib/thin/connection.rb:54:in `process' (gem) thin-1.5.1/lib/thin/connection.rb:39:in `receive_data' (gem) eventmachine-1.0.3/lib/eventmachine.rb:187:in `run' (gem) thin-1.5.1/lib/thin/backends/base.rb:63:in `start' (gem) thin-1.5.1/lib/thin/server.rb:159:in `start' (gem) rack-1.4.5/lib/rack/handler/thin.rb:13:in `run' (gem) rack-1.4.5/lib/rack/server.rb:268:in `start' (gem) railties-3.2.13/lib/rails/commands/server.rb:70:in `start' (gem) railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>' (gem) railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>' script/rails:6:in `<main>'I am at a complete loss as to what could be causing this all of a sudden.Don't know if this will help, but this is my Gemfile.lock:GIT remote: git://github.com/ctran/annotate_models.git revision: 8bd159c7a484093fde84beaa9e6398f25ddacf09 specs: annotate (2.6.0.beta1) activerecord (>= 2.3.0) rake (>= 0.8.7)GEM remote: https://rubygems.org/ specs: actionmailer (3.2.13) actionpack (= 3.2.13) mail (~> 2.5.3) actionpack (3.2.13) activemodel (= 3.2.13) activesupport (= 3.2.13) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) rack (~> 1.4.5) rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.2.1) active_utils (1.0.5) activesupport (>= 2.3.11) i18n activemerchant (1.32.1) active_utils (>= 1.0.2) activesupport (>= 2.3.14) builder (>= 2.0.0) i18n json (>= 1.5.1) money nokogiri activemodel (3.2.13) activesupport (= 3.2.13) builder (~> 3.0.0) activerecord (3.2.13) activemodel (= 3.2.13) activesupport (= 3.2.13) arel (~> 3.0.2) tzinfo (~> 0.3.29) activeresource (3.2.13) activemodel (= 3.2.13) activesupport (= 3.2.13) activesupport (3.2.13) i18n (= 0.6.1) multi_json (~> 1.0) acts-as-taggable-on (2.4.1) rails (>= 3, < 5) addressable (2.3.4) arel (3.0.2) autoparse (0.3.3) addressable (>= 2.3.1) extlib (>= 0.9.15) multi_json (>= 1.0.0) bcrypt-ruby (3.0.1) better_errors (0.8.0) coderay (>= 1.0.0) erubis (>= 2.6.6) binding_of_caller (0.7.1) debug_inspector (>= 0.0.1) bootstrap-sass (2.3.1.0) sass (~> 3.2) bootstrap-wysihtml5-rails (0.3.1.19) railties (>= 3.0) builder (3.0.4) bullet (4.6.0) uniform_notifier cancan (1.6.9) carrierwave (0.8.0) activemodel (>= 3.2.0) activesupport (>= 3.2.0) coderay (1.0.9) coffee-rails (3.2.2) coffee-script (>= 2.2.0) railties (~> 3.2.0) coffee-script (2.2.0) coffee-script-source execjs coffee-script-source (1.6.2) countries (0.9.2) currencies (>= 0.4.0) currencies (0.4.0) daemons (1.1.9) database_cleaner (1.0.0.RC1) debug_inspector (0.0.2) devise (2.2.3) bcrypt-ruby (~> 3.0) orm_adapter (~> 0.1) railties (~> 3.1) warden (~> 1.2.1) diff-lcs (1.2.4) email_spec (1.4.0) launchy (~> 2.1) mail (~> 2.2) erubis (2.7.0) eventmachine (1.0.3) excon (0.21.0) execjs (1.4.0) multi_json (~> 1.0) extlib (0.9.16) faraday (0.8.7) multipart-post (~> 1.1) fog (1.11.0) builder excon (~> 0.20) formatador (~> 0.2.0) google-api-client (~> 0.6.2) json (~> 1.7) mime-types net-scp (~> 1.1) net-ssh (>= 2.1.3) nokogiri (~> 1.5.0) ruby-hmac font-awesome-sass-rails (3.0.2.2) railties (>= 3.1.1) sass-rails (>= 3.1.1) formatador (0.2.4) friendly_id (4.0.9) google-api-client (0.6.3) addressable (>= 2.3.2) autoparse (>= 0.3.3) extlib (>= 0.9.15) faraday (~> 0.8.4) jwt (>= 0.1.5) launchy (>= 2.1.1) multi_json (>= 1.0.0) signet (>= 0.4.4) uuidtools (>= 2.1.0) haml (4.0.2) tilt hike (1.2.2) i18n (0.6.1) journey (1.0.4) jquery-rails (2.2.1) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) jquery-ui-rails (3.0.1) jquery-rails railties (>= 3.1.0) json (1.7.7) jwt (0.1.8) multi_json (>= 1.5) kaminari (0.14.1) actionpack (>= 3.0.0) activesupport (>= 3.0.0) launchy (2.3.0) addressable (~> 2.3) letter_opener (1.0.0) launchy (>= 2.0.4) libv8 (3.11.8.17) mail (2.5.3) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) meta_request (0.2.3) rack-contrib railties mime-types (1.23) mini_magick (3.5.0) subexec (~> 0.2.1) money (5.1.1) i18n (~> 0.6.0) multi_json (1.7.2) multipart-post (1.2.0) nested_form (0.3.2) net-scp (1.1.0) net-ssh (>= 2.6.5) net-ssh (2.6.7) newrelic_rpm (3.6.1.88) nokogiri (1.5.9) orm_adapter (0.4.0) pg (0.15.1) piggybak (0.6.30) activemerchant countries devise rack-ssl-enforcer rails (~> 3.2.8) rails_admin (~> 0.4.5) piggybak_bundle_discounts (0.0.5) rails (~> 3.2.8) piggybak_stripe (0.0.2) stripe (= 1.7.4) piggybak_variants (0.0.17) rails (~> 3.2.3) polyglot (0.3.3) quiet_assets (1.0.2) railties (>= 3.1, < 5.0) rack (1.4.5) rack-cache (1.2) rack (>= 0.4) rack-contrib (1.1.0) rack (>= 0.9.1) rack-pjax (0.7.0) nokogiri (~> 1.5) rack (~> 1.3) rack-ssl (1.3.3) rack rack-ssl-enforcer (0.2.5) rack-test (0.6.2) rack (>= 1.0) rails (3.2.13) actionmailer (= 3.2.13) actionpack (= 3.2.13) activerecord (= 3.2.13) activeresource (= 3.2.13) activesupport (= 3.2.13) bundler (~> 1.0) railties (= 3.2.13) rails_admin (0.4.7) bootstrap-sass (~> 2.2) builder (~> 3.0) coffee-rails (~> 3.1) font-awesome-sass-rails (~> 3.0, >= 3.0.0.1) haml (~> 4.0) jquery-rails (~> 2.1) jquery-ui-rails (~> 3.0) kaminari (~> 0.14) nested_form (~> 0.3) rack-pjax (~> 0.6) rails (~> 3.1) remotipart (~> 1.0) safe_yaml (~> 0.6) sass-rails (~> 3.1) railties (3.2.13) actionpack (= 3.2.13) activesupport (= 3.2.13) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) rake (10.0.4) rdoc (3.12.2) json (~> 1.4) ref (1.0.4) remotipart (1.0.5) rest-client (1.6.7) mime-types (>= 1.16) rmagick (2.13.2) rolify (3.2.0) rspec-core (2.13.1) rspec-expectations (2.13.0) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.13.1) rspec-rails (2.13.1) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) rspec-core (~> 2.13.0) rspec-expectations (~> 2.13.0) rspec-mocks (~> 2.13.0) ruby-hmac (0.4.0) safe_yaml (0.9.1) sass (3.2.8) sass-rails (3.2.6) railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) sendgrid (1.1.0) json json sextant (0.2.3) activesupport (>= 3.2) rails (>= 3.2) signet (0.4.5) addressable (>= 2.2.3) faraday (~> 0.8.1) jwt (>= 0.1.5) multi_json (>= 1.0.0) simple_form (2.1.0) actionpack (~> 3.0) activemodel (~> 3.0) sprockets (2.2.2) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) stripe (1.7.4) multi_json (~> 1.1) rest-client (~> 1.4) subexec (0.2.3) therubyracer (0.11.4) libv8 (~> 3.11.8.12) ref thin (1.5.1) daemons (>= 1.0.9) eventmachine (>= 0.12.6) rack (>= 1.0.0) thor (0.18.1) tilt (1.4.0) treetop (1.4.12) polyglot polyglot (>= 0.3.1) tzinfo (0.3.37) uglifier (2.0.1) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) uniform_notifier (1.2.0) uuidtools (2.1.4) warden (1.2.1) rack (>= 1.0)PLATFORMS rubyDEPENDENCIES acts-as-taggable-on annotate! better_errors (>= 0.7.2) binding_of_caller (>= 0.7.1) bootstrap-sass (>= 2.3.0.0) bootstrap-wysihtml5-rails bullet cancan (>= 1.6.9) carrierwave coffee-rails (~> 3.2.1) database_cleaner (>= 1.0.0.RC1) devise (>= 2.2.3) email_spec (>= 1.4.0) execjs fog font-awesome-sass-rails friendly_id jquery-rails letter_opener meta_request mini_magick newrelic_rpm pg (>= 0.15.0) piggybak piggybak_bundle_discounts piggybak_stripe piggybak_variants quiet_assets (>= 1.0.2) rails (= 3.2.13) rails_admin rmagick rolify (>= 3.2.0) rspec-rails (>= 2.12.2) sass-rails (~> 3.2.3) sendgrid (>= 1.0.1) sextant simple_form (>= 2.1.0) therubyracer thin (>= 1.5.0) uglifier (>= 1.0.3)Edit 1Here is my Gemfile:source 'https://rubygems.org'gem 'rails', '3.2.13'group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' gem 'uglifier', '>= 1.0.3'endgroup :development do gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git' gem 'sextant' gem "quiet_assets", ">= 1.0.2" gem "better_errors", ">= 0.7.2" gem "binding_of_caller", ">= 0.7.1" gem 'meta_request' gem 'execjs' gem 'therubyracer' gem "letter_opener" gem 'bullet' # gem 'rack-mini-profiler'endgroup :test do gem "database_cleaner", ">= 1.0.0.RC1" gem "email_spec", ">= 1.4.0"endgroup :development, :test do gem "rspec-rails", ">= 2.12.2"endgem 'jquery-rails'gem "thin", ">= 1.5.0"gem "pg", ">= 0.15.0"gem "font-awesome-sass-rails"gem "bootstrap-sass", ">= 2.3.0.0"gem "bootstrap-wysihtml5-rails"gem "bootstrap-sass", ">= 2.3.0.0"gem "sendgrid", ">= 1.0.1"gem "devise", ">= 2.2.3"gem "cancan", ">= 1.6.9"gem "rolify", ">= 3.2.0"gem "simple_form", ">= 2.1.0"gem "newrelic_rpm"gem "rmagick"gem "mini_magick"gem "carrierwave"gem "fog"gem "piggybak"gem "piggybak_variants"gem "piggybak_bundle_discounts"gem "rails_admin"gem "acts-as-taggable-on"gem "friendly_id"gem "piggybak_stripe" 解决方案 There are a few things to note here:It's safer to specify maximum versions to update to in your GemfileYour session is not deserializing correctly - this is the cause of the exception you're seeingIf you're having trouble with a single gem and need to update, use bundle update <gem name>Specify maximum Gem versionsYou should get into the practice of using the pessimistic version constraint (the ~> operator) in your Gemfile. This essentially allows you to say that gems can only be updated to higher patch levels.Ruby developers tend to use the standard of version numbers with three numbers: x.x.x, e.g. 2.0.1. The first number is the major version, the second number the minor version and the third number is the patch.Major version updates are likely to break old functionality. If you upgrade from 1.x.x to 2.x.x, it could be a painful process. Minor version updates should add features and, in rare cases, change existing functionality, but it should be backwards compatible. Patch level updates should be purely bug fixes.The pessimistic version constraint can be used to say "only allow patch level updates". For example:gem 'devise', '~> 2.2.3' # Only the '.3' can increase, e.g. 2.2.4, 2.2.5If you do this for all of your gems then you can be reasonably sure that bundle update will update gems to compatible versions. In your Gemfile you havegem 'devise', '>= 2.2.3'This would potentially allow the installation of devise 3.0.0, which you can almost guarantee would be problematic.It's good practice to find a gem configuration that works, then use the pessimistic version constraint to lock your Gemfile down to only patch level updates.Session deserializationIt looks like devise has been updated, which has caused a session deserialization problem. You could check out an old version of your Gemfile.lock, then downgrade to the devise version that was working. Or you could just clear your cache if you don't have anything critical in the session and use the new version.Update a single gemRunning bundle update will attempt to update all gems in your Gemfile. If you only need to update a single gem, use bundle update <gem name>. All the others will remain at the same version. 这篇关于设计问题:TypeError - [17]不是一个符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-15 08:13