Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8331929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:34:08+00:00 2026-06-09T02:34:08+00:00

I have an application who works fine locally, but breaks with a syntax error

  • 0

I have an application who works fine locally, but breaks with a syntax error on heroku, on a file whose syntax is successfully verified by my local version of ruby.

The application is a new Rails 3.1 application. It works locally.
I just tried to push it to heroku (first time for this app). I am confident all the code has been committed, and pushed to heroku.
The migration (heroku run rake db:migrate) worked.

When I tried to run the application, I got the error page. Here is an extract from the logs. Full logs from the console at the end of this question.

2012-01-09T21:31:36+00:00 app[web.1]: Exiting
2012-01-09T21:31:36+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require': /app/app/controllers/ios_applications_controller.rb:32: syntax error, unexpected tASSOC, expecting ')' (SyntaxError)
2012-01-09T21:31:36+00:00 app[web.1]: ...on_path ( :bundle_identifier => params[:bundle_identifier] )...
2012-01-09T21:31:36+00:00 app[web.1]: ...                               ^
2012-01-09T21:31:36+00:00 app[web.1]: /app/app/controllers/ios_applications_controller.rb:32: syntax error, unexpected ')', expecting keyword_end
2012-01-09T21:31:36+00:00 app[web.1]: ...=> params[:bundle_identifier] ), :notice => "No iOS applicat...
2012-01-09T21:31:36+00:00 app[web.1]: ...                               ^

Note the app/app/... weird path (locally, I don’t have this weird structure). This is similar to this question (no helpful answers).

Here is the relevant code of the file ios_applications_controller.rb:

def show

  @ios_application = IosApplication.find(params[:id]) if (params[:id])
  @ios_application = IosApplication.find_by_application_bundle_identifier(params[:bundle_identifier]) if @ios_application.nil? && params[:bundle_identifier]


  if @ios_application.nil?
      # The line below is the mentioned line (32)
     redirect_to new_ios_application_path ( :bundle_identifier => params[:bundle_identifier] ), :notice => "No iOS application found for #{params[:bundle_identifier]}. Would you like to create it?"

      # This does not work either:
      # redirect_to new_ios_application_path, :bundle_identifier => params[:bundle_identifier], :notice => "No iOS application found for #{params[:bundle_identifier]}. Would you like to create it?"

     return
  end


  respond_to do |format|
    format.html # show.html.erb
    format.json { render :json => @ios_application }
  end
end

A syntax check on the file shows no error:

$ ruby -wc app/controllers/ios_applications_controller.rb 
Syntax OK

Locally, I am running ruby 1.8.7 and Rails 3.1.3.
On heroku, I am using the cedar stack:

$ heroku stack
   aspen-mri-1.8.6
   bamboo-mri-1.9.2
   bamboo-ree-1.8.7
 * cedar (beta)


Full logs:

$ heroku logs --tail

2012-01-09T21:31:21+00:00 heroku[api]: Add-on add logging:basic by guillaume@macmation.com
2012-01-09T21:31:21+00:00 heroku[api]: Release v5 created by guillaume@macmation.com
2012-01-09T21:31:22+00:00 heroku[web.1]: State changed from crashed to created
2012-01-09T21:31:22+00:00 heroku[web.1]: State changed from created to starting
2012-01-09T21:31:28+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 55950`
2012-01-09T21:31:36+00:00 app[web.1]: => Booting WEBrick
2012-01-09T21:31:36+00:00 app[web.1]: => Rails 3.1.3 application starting in production on http://0.0.0.0:55950
2012-01-09T21:31:36+00:00 app[web.1]: => Call with -d to detach
2012-01-09T21:31:36+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-01-09T21:31:36+00:00 app[web.1]: Exiting
2012-01-09T21:31:36+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require': /app/app/controllers/ios_applications_controller.rb:32: syntax error, unexpected tASSOC, expecting ')' (SyntaxError)
2012-01-09T21:31:36+00:00 app[web.1]: ...on_path ( :bundle_identifier => params[:bundle_identifier] )...
2012-01-09T21:31:36+00:00 app[web.1]: ...                               ^
2012-01-09T21:31:36+00:00 app[web.1]: /app/app/controllers/ios_applications_controller.rb:32: syntax error, unexpected ')', expecting keyword_end
2012-01-09T21:31:36+00:00 app[web.1]: ...=> params[:bundle_identifier] ), :notice => "No iOS applicat...
2012-01-09T21:31:36+00:00 app[web.1]: ...                               ^
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:225:in `load_dependency'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:348:in `require_or_load'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:302:in `depend_on'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:214:in `require_dependency'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/engine.rb:417:in `block (2 levels) in eager_load!'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/engine.rb:416:in `each'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/engine.rb:416:in `block in eager_load!'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/engine.rb:414:in `each'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/engine.rb:414:in `eager_load!'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/application/finisher.rb:51:in `block in <module:Finisher>'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `run'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `each'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/application.rb:96:in `initialize!'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/config/environment.rb:5:in `<top (required)>'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:51:in `instance_eval'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/config.ru:4:in `block in <main>'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/config.ru:1:in `new'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/config.ru:1:in `<main>'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:51:in `initialize'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:40:in `eval'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:40:in `parse_file'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.6/lib/rack/server.rb:200:in `app'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/commands/server.rb:46:in `app'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.6/lib/rack/server.rb:301:in `wrapped_app'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.6/lib/rack/server.rb:252:in `start'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/commands.rb:54:in `block in <top (required)>'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/commands.rb:49:in `tap'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/commands.rb:49:in `<top (required)>'
2012-01-09T21:31:36+00:00 app[web.1]:   from script/rails:6:in `require'
2012-01-09T21:31:36+00:00 app[web.1]:   from script/rails:6:in `<main>'
2012-01-09T21:31:36+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/commands/server.rb:70:in `start'
2012-01-09T21:31:37+00:00 heroku[web.1]: State changed from starting to crashed
2012-01-09T21:31:38+00:00 heroku[web.1]: Process exited
2012-01-09T21:41:11+00:00 heroku[web.1]: State changed from crashed to created
2012-01-09T21:41:11+00:00 heroku[web.1]: State changed from created to starting
2012-01-09T21:41:23+00:00 heroku[web.1]: State changed from starting to crashed
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T02:34:09+00:00Added an answer on June 9, 2026 at 2:34 am

    In production, a space seems to not be allowed between the method name and the opening parenthesis.

    redirect_to new_ios_application_path ( ... # Invalid syntax
    redirect_to new_ios_application_path( ...  # Ok (no space after new_ios_application_path)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have written an application that needs to process outgoing calls. Everything works fine,
Hi i have the following code which works fine in my machine but when
i have application who use specific process during running and i want to sample
Currently we have an application who use spring who support mysql. Some people prefer
I have a Unity3D application who needs registration. The user needs to register in
I am building a Rails application that contains Developer s who have Application s.
I have a an application with interns who can apply to internships. We have
I have developed a application for a client who uses windows 7 home premium
In my application I have a customer who can have multiple locations. When you
Hi i have a WP7 application that calls a wcf who runs with membership

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.