1

我的生产应用程序突然神秘地停止了工作。在当地工作良好。

Heroku日志显示此错误:

/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies。rb:251:在“require”中:/app/app/controllers/sessions_controller.rb:84:语法错误,意外的关键字_end,应为$end(SyntaxError)

我已经清理了控制器中的空白,但似乎没有修复任何问题。没有漂浮物结束任何地方都可以。也没有挂起的迁移

我怀疑这是一个gem依赖问题但实际上并不知道。我不是最擅长版本控制的人。在大约10周的学校休息后,我开始着手这个项目。因此,在这段时间内,gem更新可能出现了一些问题,而这只是在今天的生产服务器总体故障中表现出来的。

完整日志:

正在退出2013-11-30T03:12:56.528872+00:00 app[web.1]:来自/app/svendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencients.rb:251:in“请求中的块”2013-11-30T03:12:56.528872+00:00 app[web.1]:/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencients.rb:251:in `require':/app/app/controllers/sessions_controller.rb:84:语法错误,意外的关键字_end,应为$end(SyntaxError)2013-11-30T03:12:56.528872+00:00 app[web.1]:来自/app/svendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependency.rb:236:in“load_dependency”2013-11-30T03:12:56.528872+00:00 app[web.1]:来自/app/svendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencients.rb:251:在“require”中2013-11-30T03:12:56.528872+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencients.rb:359:在“require_or_load”中2013-11-30T03:12:56.529118+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencients.rb:313:in“depend_on”2013-11-30T03:12:56.529118+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/engine.rb:439:in `block(2 levels)in eager_load!'2013-11-30T03:12:56.529118+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railies-3.2.9/lib/rails/engine.rb:438:in“each”2013-11-30T03:12:56.529118+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railies-3.2.9/lib/rails/engine.rb:438:in `block in eager_load!'2013-11-30T03:12:56.529118+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railies-3.2.9/lib/rails/engine.rb:436:in“each”2013-11-30T03:12:56.529118+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependency.rb:225:在“require_dependency”中2013-11-30T03:12:56.529118+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/initializable.rb:30:in“instance_exec”2013-11-30T03:12:56.529118+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/initializable.rb:30:in“run”2013-11-30T03:12:56.529324+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railies-3.2.9/lib/rails/initializable.rb:54:in `run_initializers'2013-11-30T03:12:56.529324+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railies-3.2.9/lib/rails/application.rb:136:in“initialize!”2013-11-30T03:12:56.529118+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railies-3.2.9/lib/rails/engine.rb:436:in `ager_load!'2013-11-30T03:12:56.529324+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/initializable.rb:54:in“each”2013-11-30T03:12:56.529324+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railies-3.2.9/lib/rails/railtie/configurable.rb:30:in `method_missing'2013-11-30T03:12:56.529118+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railies-3.2.9/lib/rails/application/finisher.rb:53:in“block in<module:finisher>”2013-11-30T03:12:56.529324+00:0 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependences.rb:251:在`require'中2013-11-30T03:12:56.529324+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencients.rb:251:in“请求中的块”2013-11-30T03:12:56.5299812+00:00-app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/rack--1.4.5/lib/rack/builder.rb:51:在“初始化”中2013-11-30T03:12:56.529324+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependency.rb:236:in“load_dependency”2013-11-30T03:12:56.529812+00:00应用程序[web.1]:来自/app/config.ru:在“<main>”中2013-11-30T03:12:56.5299812+00:00 app[web.1]:来自/app/config.ru:在“new”中2013-11-30T03:12:56.529324+00:00 app[web.1]:来自/app/config/environment.rb:7:in“<top(required)>”2013-11-30T03:12:56.529812+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in“eval”2013-11-30T03:12:56.529812+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'2013-11-30T03:12:56.529812+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railies-3.2.9/lib/rails/commands/server.rb:46:in `app'2013-11-30T03:12:56.529968+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:254:in“start”2013-11-30T03:12:56.529968+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railies-3.2.9/lib/rails/commands.rb:50:in `tap'2013-11-30T03:12:56.529968+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railies-3.2.9/lib/rails/commands/server.rb:70:in“start”2013-11-30T03:12:56.529968+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railies-3.2.9/lib/rails/commands.rb:55:in“block in<top(required)>”2013-11-30T03:12:56.529324+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railies-3.2.9/lib/rails/initializable.rb:55:in“run_initializers中的块”2013-11-30T03:12:56.529812+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'2013-11-30T03:12:56.529812+00:00 app[web.1]:来自/app/config.ru:3:在“block in<main>”中2013-11-30T03:12:56.529968+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:50:in `<top(required)>'2013-11-30T03:12:56.529968+00:00应用程序[web.1]:来自脚本/轨道:6:in“<main>”2013-11-30T03:12:56.529968+00:00应用程序[web.1]:来自脚本/轨道:6:在“require”中2013-11-30T03:12:56.529812+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:在“app”中2013-11-30T03:12:56.529812+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'2013-11-30T03:12:56.529324+00:00 app[web.1]:来自/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencients.rb:251:在“require”中2013-11-30T03:12:57.855534+00:00 heroku[web.1]:进程退出,状态为12013-11-30T03:12:57.866879+00:00 heroku[web.1]:状态从开始更改为崩溃2013-11-30T03:13:05.403562+00:00 heroku[路由器]:at=error code=H10 desc=“应用程序崩溃”method=GET path=/host=peopleandstuff.com fwd=“24.128.163.195”dyno=connect=service=status=503字节=2013-11-30T03:13:08.057496+00:00 heroku[路由器]:at=error code=H10 desc=“应用程序崩溃”method=GET path=/host=peopleandstuff.com fwd=“24.128.163.195”dyno=connect=service=status=503字节=2013-11-30T03:13.257229+00:00 heroku[路由器]:at=错误代码=H10 desc=“应用程序崩溃”方法=GET路径=/host=peopleandstuff.com fwd=“24.128.163.195”dyno=连接=服务=状态=503字节=2013-11-30T03:16:22.969850+00:00 heroku[路由器]:at=error code=H10 desc=“应用程序崩溃”method=GET path=/host=peopleandstuff.com fwd=“24.128.163.195”dyno=connect=service=status=503字节=2013-11-30T03:16:23.473382+00:00 heroku[路由器]:at=错误代码=H10 desc=“应用程序崩溃”方法=GET路径=/favicon.ico host=peopleandstuff.com fwd=“24.128.163.195”dyno=connect=service=status=503字节=2013-11-30T03:16:23.530070+00:00 heroku[路由器]:at=错误代码=H10 desc=“应用程序崩溃”方法=GET路径=/favicon.ico host=peopleandstuff.com fwd=“24.128.163.195”dyno=connect=service=status=503字节=2013-11-30T03:16:25.601918+00:00 heroku[路由器]:at=error code=H10 desc=“应用程序崩溃”method=GET path=/host=peopleandstuff.com fwd=“24.128.163.195”dyno=connect=service=status=503字节=

会话控制器:主旨:gist.github.com/anonymous/7715681

类SessionsController#skip_before_filter:要求登录#skip_before_filter:授权#使用Clearance gem实现的会话def新结束定义创建_工作簿#user=user.from_omniauth(env[“omniauth.auth”])#会话[:user_id]=用户.id#重定向到根urlauth_hash=请求.env[“omniauth.auth”]authentication=身份验证.find_by_provider_and_uid(auth_hash[“provider”],auth_hash[“uid”])||authentication.create_with_omniauth(auth_hash)if身份验证.useruser=身份验证.userauthentication.update_token(auth_hash)@next=根url@notice=“已登录!”其他的user=user.create_with_auth_and_hash(身份验证,auth_hash)@next=编辑用户路径(用户)@notice=“用户创建-确认或编辑详细信息…”结束签名_(用户)redirect_to@next,:notice=>@notice结束结束定义创建@user=user.authenticate(params[:session][:email],参数[:会话][:密码])如果是@user.nil?#创建错误消息并重新提交登录表单flash.now[:error]=“无效的电子邮件/密码”@title=“登录”呈现“新”其他的#让用户登录并重定向到用户的显示页面。sign_in@userredirect_back_or@user,无结束结束def销毁注销(_O)重定向到根路径结束私有的def redirect_back_or(默认,通知)flash[:notice]=通知if会话[:followedtag]@tag=标签查找(会话[:followed_tag])除非current_user.followedtags.include?(@组)current_user.follow!(@标签)结束session.delete(:followed_tag)结束if会话[:joined组]@group=group.fund(会话[:joined_group])除非current_user.groups_as_member.include?(@组)current_user.join!(@组)结束session.delete(:joined_group)结束if会话[:return_to]重定向到会话[:return_to]session.delete(:return_to)其他的重定向到默认值(_T)结束结束定义存储位置session[:return_to]=请求完整路径结束结束

谢谢大家的帮助

1答案1

重置为默认值
5

你有多余的结束在你的结尾创建_脸书行动。如果你看一下缩进,你会发现你有一个结束与块的开头不一致:

定义create_facebook#user=user.from_omniauth(env[“omniauth.auth”])#会话[:user_id]=用户.id#重定向到root_urlauth_hash=请求.env[“omniauth.auth”]authentication=身份验证.find_by_provider_and_uid(auth_hash[“provider”],auth_hash[“uid”])||authentication.create_with_omniauth(auth_hash)if身份验证.useruser=身份验证.userauthentication.update_token(auth_hash)@next=根url@notice=“已登录!”其他的user=user.create_with_auth_and_hash(身份验证,auth_hash)@next=编辑用户路径(用户)@notice=“用户创建-确认或编辑详细信息…”结束签名_(用户)redirect_to@next,:notice=>@noticeend#<---****这个****结束
1
  • 1
    谢谢,显然我数不清。好好享受周末
    – 布瑞恩
    评论 2013年11月30日14:56

你的答案

单击“发布您的答案”,表示您同意我们的服务条款并确认您已阅读我们的隐私政策.

不是你想要的答案吗?浏览已标记的其他问题问你自己的问题.