Note that there are some explanatory texts on larger screens.

plurals
  1. POHeroku production app suddenly stopped working and serves "syntax error" though there is none
    primarykey
    data
    text
    <p>My production app has suddenly and mysteriously stopped working. Works fine locally.</p> <p><strong>Heroku logs show me this error:</strong></p> <pre><code>/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require': /app/app/controllers/sessions_controller.rb:84: syntax error, unexpected keyword_end, expecting $end (SyntaxError) </code></pre> <p>I have cleaned up whitespace in the controller but it doesn't seem to fix anything. There is not a floating <code>end</code> anywhere either. no migrations pending either</p> <p><strong>I suspect this is a gem dependency issue</strong> But don't actually know. I'm not the greatest with version control. I'm picking up work on this project after about a 10 week break for school. So maybe something has broken over that time period with gem updates and it only just manifested itself in total production server failure today.</p> <p>full logs:</p> <pre><code>Exiting 2013-11-30T03:12:56.528872+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in 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/dependencies.rb:251:in `require': /app/app/controllers/sessions_controller.rb:84: syntax error, unexpected keyword_end, expecting $end (SyntaxError) 2013-11-30T03:12:56.528872+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency' 2013-11-30T03:12:56.528872+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require' 2013-11-30T03:12:56.528872+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:359:in `require_or_load' 2013-11-30T03:12:56.529118+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:313:in `depend_on' 2013-11-30T03:12:56.529118+00:00 app[web.1]: from /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]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/engine.rb:438:in `each' 2013-11-30T03:12:56.529118+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/engine.rb:438:in `block in eager_load!' 2013-11-30T03:12:56.529118+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/engine.rb:436:in `each' 2013-11-30T03:12:56.529118+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:225:in `require_dependency' 2013-11-30T03:12:56.529118+00:00 app[web.1]: from /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]: from /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]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `run_initializers' 2013-11-30T03:12:56.529324+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/application.rb:136:in `initialize!' 2013-11-30T03:12:56.529118+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/engine.rb:436:in `eager_load!' 2013-11-30T03:12:56.529324+00:00 app[web.1]: from /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]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30:in `method_missing' 2013-11-30T03:12:56.529118+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/application/finisher.rb:53:in `block in &lt;module:Finisher&gt;' 2013-11-30T03:12:56.529324+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require' 2013-11-30T03:12:56.529324+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in require' 2013-11-30T03:12:56.529812+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize' 2013-11-30T03:12:56.529324+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency' 2013-11-30T03:12:56.529812+00:00 app[web.1]: from /app/config.ru:in `&lt;main&gt;' 2013-11-30T03:12:56.529812+00:00 app[web.1]: from /app/config.ru:in `new' 2013-11-30T03:12:56.529324+00:00 app[web.1]: from /app/config/environment.rb:7:in `&lt;top (required)&gt;' 2013-11-30T03:12:56.529812+00:00 app[web.1]: from /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]: from /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]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands/server.rb:46:in `app' 2013-11-30T03:12:56.529968+00:00 app[web.1]: from /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]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:50:in `tap' 2013-11-30T03:12:56.529968+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands/server.rb:70:in `start' 2013-11-30T03:12:56.529968+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:55:in `block in &lt;top (required)&gt;' 2013-11-30T03:12:56.529324+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/initializable.rb:55:in `block in run_initializers' 2013-11-30T03:12:56.529812+00:00 app[web.1]: from /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]: from /app/config.ru:3:in `block in &lt;main&gt;' 2013-11-30T03:12:56.529968+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:50:in `&lt;top (required)&gt;' 2013-11-30T03:12:56.529968+00:00 app[web.1]: from script/rails:6:in `&lt;main&gt;' 2013-11-30T03:12:56.529968+00:00 app[web.1]: from script/rails:6:in `require' 2013-11-30T03:12:56.529812+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app' 2013-11-30T03:12:56.529812+00:00 app[web.1]: from /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]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require' 2013-11-30T03:12:57.855534+00:00 heroku[web.1]: Process exited with status 1 2013-11-30T03:12:57.866879+00:00 heroku[web.1]: State changed from starting to crashed 2013-11-30T03:13:05.403562+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=peopleandstuff.com fwd="24.128.163.195" dyno= connect= service= status=503 bytes= 2013-11-30T03:13:08.057496+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=peopleandstuff.com fwd="24.128.163.195" dyno= connect= service= status=503 bytes= 2013-11-30T03:13:10.257229+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=peopleandstuff.com fwd="24.128.163.195" dyno= connect= service= status=503 bytes= 2013-11-30T03:16:22.969850+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=peopleandstuff.com fwd="24.128.163.195" dyno= connect= service= status=503 bytes= 2013-11-30T03:16:23.473382+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=peopleandstuff.com fwd="24.128.163.195" dyno= connect= service= status=503 bytes= 2013-11-30T03:16:23.530070+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=peopleandstuff.com fwd="24.128.163.195" dyno= connect= service= status=503 bytes= 2013-11-30T03:16:25.601918+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=peopleandstuff.com fwd="24.128.163.195" dyno= connect= service= status=503 bytes= </code></pre> <p><strong>Sessions Controller:</strong> gist: <a href="https://gist.github.com/anonymous/7715681" rel="nofollow">gist.github.com/anonymous/7715681</a></p> <pre><code>class SessionsController &lt; ApplicationController # skip_before_filter :require_login # skip_before_filter :authorize #sessions implemented using Clearance gem def new end def create_facebook # user = User.from_omniauth(env["omniauth.auth"]) # session[:user_id] = user.id # redirect_to root_url auth_hash = request.env["omniauth.auth"] authentication = Authentication.find_by_provider_and_uid(auth_hash["provider"], auth_hash["uid"]) || Authentication.create_with_omniauth(auth_hash) if authentication.user user = authentication.user authentication.update_token(auth_hash) @next = root_url @notice = "Signed in!" else user = User.create_with_auth_and_hash(authentication,auth_hash) @next = edit_user_path(user) @notice = "User created - confirm or edit details..." end sign_in(user) redirect_to @next, :notice =&gt; @notice end end def create @user = User.authenticate(params[:session][:email], params[:session][:password]) if @user.nil? #create an error message and rerender signin form flash.now[:error] = "Invalid email/password" @title = "Sign in" render 'new' else #sign the user in and redirect to the user's show page. sign_in @user redirect_back_or @user, nil end end def destroy sign_out redirect_to root_path end private def redirect_back_or(default, notice) flash[:notice] = notice if session[:followed_tag] @tag = Tag.find(session[:followed_tag]) unless current_user.followed_tags.include?(@group) current_user.follow!(@tag) end session.delete(:followed_tag) end if session[:joined_group] @group = Group.find(session[:joined_group]) unless current_user.groups_as_member.include?(@group) current_user.join!(@group) end session.delete(:joined_group) end if session[:return_to] redirect_to session[:return_to] session.delete(:return_to) else redirect_to default end end def store_location session[:return_to] = request.fullpath end end </code></pre> <p>Thanks guys for any help</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload