Application error heroku, ruby on rails tutorial - ruby-on-rails-3

I am following the ruby on rails tutorial(recomended here on stack:) ) Loved it so far but i can't seem to deploy my application via heroku. Can someone give me light on what to do?
2015-07-23T23:46:37.387879+00:00 heroku[web.1]: Process exited with status 1
2015-07-23T23:46:37.390702+00:00 heroku[web.1]: State changed from starting to crashed
2015-07-23T23:46:38.056116+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/?_c9_id=livepreview7&_c9_host=https://ide.c9.io" host=vast-shore-9845.herokuapp.com request_id=9bc94d44-685f-4554-9940-fe01f5f8acfc fwd="84.81.77.100" dyno= connect= service= status=503 bytes=
2015-07-23T23:47:04.275534+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby app
2015-07-23T23:47:04.275511+00:00 heroku[slug-compiler]: Slug compilation started
2015-07-23T23:47:34.243854+00:00 heroku[slug-compiler]: Slug compilation started
2015-07-23T23:47:34.243873+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby app
2015-07-23T23:47:48.259354+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/?_c9_id=livepreview7&_c9_host=https://ide.c9.io" host=vast-shore-9845.herokuapp.com request_id=80c80609-252a-4603-adc1-ef8fd3803675 fwd="84.81.77.100" dyno= connect= service= status=503 bytes=
2015-07-23T23:50:42.867239+00:00 heroku[slug-compiler]: Slug compilation started
2015-07-23T23:50:42.867266+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby app
2015-07-23T23:53:02.818263+00:00 heroku[slug-compiler]: Slug compilation started
2015-07-23T23:53:02.818432+00:00 heroku[slug-compiler]: Slug compilation finished
2015-07-23T23:53:02.741040+00:00 heroku[api]: Deploy cb3c9d8 by
2015-07-23T23:53:02.741040+00:00 heroku[api]: Release v6 created by
2015-07-23T23:53:02.845508+00:00 heroku[web.1]: State changed from crashed to starting
2015-07-23T23:53:07.556502+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 10779 -e production`
2015-07-23T23:53:11.732808+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails/helpers.rb:11:in `<top (required)>': uninitialized constant Sass::Script (NameError)
2015-07-23T23:53:11.732845+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `<top (required)>'
2015-07-23T23:53:11.732841+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `require'
2015-07-23T23:53:11.732848+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `<top (required)>'
2015-07-23T23:53:11.732853+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
2015-07-23T23:53:11.732847+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `require'
2015-07-23T23:53:11.732850+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
2015-07-23T23:53:11.732854+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
2015-07-23T23:53:11.732856+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
2015-07-23T23:53:11.732857+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
2015-07-23T23:53:11.732864+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
2015-07-23T23:53:11.732880+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
2015-07-23T23:53:11.732878+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
2015-07-23T23:53:11.732867+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
2015-07-23T23:53:11.732859+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
2015-07-23T23:53:11.732865+00:00 app[web.1]: from /app/config/application.rb:7:in `<top (required)>'
2015-07-23T23:53:11.732881+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
2015-07-23T23:53:11.732882+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2015-07-23T23:53:11.732884+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
2015-07-23T23:53:11.732885+00:00 app[web.1]: from bin/rails:8:in `require'
2015-07-23T23:53:11.732886+00:00 app[web.1]: from bin/rails:8:in `<main>'
2015-07-23T23:53:12.670912+00:00 heroku[web.1]: Process exited with status 1
2015-07-23T23:53:12.675113+00:00 heroku[web.1]: State changed from starting to crashed
2015-07-23T23:53:26.378922+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=vast-shore-9845.herokuapp.com request_id=fcb97d6f-128b-4d2b-b3e8-c2de87eb7e33 fwd="84.81.77.100" dyno= connect= service= status=503 bytes=
2015-07-23T23:53:25.583623+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=vast-shore-9845.herokuapp.com request_id=00322a0d-ad99-43c9-8c40-090c0459cfba fwd="84.81.77.100" dyno= connect= service= status=503 bytes=
2015-07-23T23:59:48.868798+00:00 heroku[slug-compiler]: Slug compilation started
2015-07-23T23:59:48.868814+00:00 heroku[slug-compiler]: Slug compilation finished
2015-07-23T23:59:48.811695+00:00 heroku[api]: Deploy d7257fd by
2015-07-23T23:59:48.811695+00:00 heroku[api]: Release v7 created by
2015-07-23T23:59:48.962017+00:00 heroku[web.1]: State changed from crashed to starting
2015-07-23T23:59:53.564068+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 45661`
2015-07-23T23:59:56.828404+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails/helpers.rb:11:in `<top (required)>': uninitialized constant Sass::Script (NameError)
2015-07-23T23:59:56.828424+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `require'
2015-07-23T23:59:56.828426+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `<top (required)>'
2015-07-23T23:59:56.828428+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `require'
2015-07-23T23:59:56.828429+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `<top (required)>'
2015-07-23T23:59:56.828431+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
2015-07-23T23:59:56.828435+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
2015-07-23T23:59:56.828437+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
2015-07-23T23:59:56.828438+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
2015-07-23T23:59:56.828440+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
2015-07-23T23:59:56.828441+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
2015-07-23T23:59:56.828442+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
2015-07-23T23:59:56.828444+00:00 app[web.1]: from /app/config/application.rb:7:in `<top (required)>'
2015-07-23T23:59:56.828445+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
2015-07-23T23:59:56.828447+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
2015-07-23T23:59:56.828448+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
2015-07-23T23:59:56.828449+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
2015-07-23T23:59:56.828450+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2015-07-23T23:59:56.828452+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
2015-07-23T23:59:56.828453+00:00 app[web.1]: from bin/rails:8:in `require'
2015-07-23T23:59:56.828457+00:00 app[web.1]: from bin/rails:8:in `<main>'
2015-07-23T23:59:57.609465+00:00 heroku[web.1]: State changed from starting to crashed
2015-07-23T23:59:57.597734+00:00 heroku[web.1]: Process exited with status 1
2015-07-23T23:59:57.610775+00:00 heroku[web.1]: State changed from crashed to starting
2015-07-24T00:00:00.487775+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 28996`
2015-07-24T00:00:03.609964+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails/helpers.rb:11:in `<top (required)>': uninitialized constant Sass::Script (NameError)
2015-07-24T00:00:03.609994+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `require'
2015-07-24T00:00:03.609997+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `<top (required)>'
2015-07-24T00:00:03.609998+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `require'
2015-07-24T00:00:03.610000+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `<top (required)>'
2015-07-24T00:00:03.610001+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
2015-07-24T00:00:03.610003+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
2015-07-24T00:00:03.610004+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
2015-07-24T00:00:03.610009+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
2015-07-24T00:00:03.610010+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
2015-07-24T00:00:03.610012+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
2015-07-24T00:00:03.610013+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
2015-07-24T00:00:03.610014+00:00 app[web.1]: from /app/config/application.rb:7:in `<top (required)>'
2015-07-24T00:00:03.610016+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
2015-07-24T00:00:03.610017+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
2015-07-24T00:00:03.610019+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
2015-07-24T00:00:03.610020+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
2015-07-24T00:00:03.610021+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2015-07-24T00:00:03.610023+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
2015-07-24T00:00:03.610024+00:00 app[web.1]: from bin/rails:8:in `require'
2015-07-24T00:00:03.610026+00:00 app[web.1]: from bin/rails:8:in `<main>'
2015-07-24T00:00:04.345273+00:00 heroku[web.1]: Process exited with status 1
2015-07-24T00:00:04.356753+00:00 heroku[web.1]: State changed from starting to crashed
2015-07-24T00:00:09.963238+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=vast-shore-9845.herokuapp.com request_id=822845f6-3908-4248-a575-814ca10d22d2 fwd="84.81.77.100" dyno= connect= service= status=503 bytes=
2015-07-24T00:00:10.800435+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=vast-shore-9845.herokuapp.com request_id=873c38e3-d55c-4645-8ac5-97422fa125bb fwd="84.81.77.100" dyno= connect= service= status=503 bytes=
2015-07-24T00:03:43.594872+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=vast-shore-9845.herokuapp.com request_id=16ab9874-71c4-48f4-9ce8-a20958396716 fwd="84.81.77.100" dyno= connect= service= status=503 bytes=
2015-07-24T00:03:44.334194+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=vast-shore-9845.herokuapp.com request_id=d21a4989-daab-4363-bcfc-a482c9977a41 fwd="84.81.77.100" dyno= connect= service= status=503 bytes=
2015-07-24T00:06:37.583563+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=vast-shore-9845.herokuapp.com request_id=f06c025a-ee76-4d4e-aa87-e2c9fa4ddf32 fwd="84.81.77.100" dyno= connect= service= status=503 bytes=
2015-07-24T00:06:38.170649+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=vast-shore-9845.herokuapp.com request_id=45c72e79-010e-48f5-8859-ff28a299e0ef fwd="84.81.77.100" dyno= connect= service= status=503 bytes=
WARNING: Toolbelt v3.40.6 update available.

The issue is actually with the gem version 5.0.1 so just run:
bundle update sass-rails
which ultimately updates you saas-rails gem to the latest one. Or you can enter the version 5.0.2+ in your Gemfile like
gem 'sass-rails', '5.0.3'

Related

Selenium chrome SessionNotCreatedException, tab crashed

I'd like to test multiple mobile user agents with selenium and chrome. I'm using python 3.6 and trying to deploy to heroku. I'm using headless chrome=68.0.3440.75 chromedriver 2.40.565383 . Based on http://chromedriver.chromium.org/mobile-emulation :
def create_chromedriver(ua=False):
options = webdriver.ChromeOptions()
CHROMEDRIVER_PATH = os.getenv('$HOME') or basedir+'/chromedriver.exe'
FLASK_CONFIG = os.getenv('FLASK_CONFIG')
if FLASK_CONFIG and FLASK_CONFIG == "production":
# CHROMEDRIVER_PATH = '/app/.chromedriver/bin/chromedriver'
CHROMEDRIVER_PATH = '/app/.chromedriver/bin/chromedriver'
GOOGLE_CHROME_SHIM = os.getenv('$GOOGLE_CHROME_SHIM') or 'no path found'
print(GOOGLE_CHROME_SHIM)
print(GOOGLE_CHROME_SHIM)
options.add_argument("--headless")
options.add_argument("--disable-gpu")
if ua:
print('ua block33')
mobile_emulation = {"deviceName": "iPad Mini"}
options.add_experimental_option("mobileEmulation", mobile_emulation)
return webdriver.Chrome(executable_path=CHROMEDRIVER_PATH, chrome_options=options)
def some_long_calculation():
driver = create_chromedriver('test')
# driver = create_chromedriver()
print(driver.capabilities['version'])
print(driver.capabilities['version'])
driver.get("https://www.yahoo.com/")
print(1)
png = driver.get_screenshot_as_png()
driver.close()
# return 'a'
return png
On both windows locally and if I run on heroku with When I run this project on heroku using
def some_long_calculation():
# driver = create_chromedriver('test')
driver = create_chromedriver()
I get the expected yahoo screenshot
However using :
def some_long_calculation():
driver = create_chromedriver('test')
results in:
2018-07-26T15:08:21.448393+00:00 heroku[web.1]: State changed from starting to up
2018-07-26T15:08:23.555153+00:00 app[web.1]: no path found
2018-07-26T15:08:23.555197+00:00 app[web.1]: no path found
2018-07-26T15:08:23.555199+00:00 app[web.1]: ua block33
2018-07-26T15:08:25.772281+00:00 heroku[router]: at=info method=GET path="/" host=mobiletest16.herokuapp.com request_id=4f72f6b0-3d8f-418f-a01b-a0281c4f644d fwd="54.86.59.209" dyno=web.1 connect=0ms service=2219ms status=500 bytes=456 protocol=https
2018-07-26T15:08:25.770879+00:00 app[web.1]: [2018-07-26 15:08:25,756] ERROR in app: Exception on / [GET]
2018-07-26T15:08:25.770892+00:00 app[web.1]: Traceback (most recent call last):
2018-07-26T15:08:25.770894+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
2018-07-26T15:08:25.770895+00:00 app[web.1]: response = self.full_dispatch_request()
2018-07-26T15:08:25.770897+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
2018-07-26T15:08:25.770899+00:00 app[web.1]: rv = self.handle_user_exception(e)
2018-07-26T15:08:25.770900+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
2018-07-26T15:08:25.770902+00:00 app[web.1]: reraise(exc_type, exc_value, tb)
2018-07-26T15:08:25.770904+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
2018-07-26T15:08:25.770907+00:00 app[web.1]: raise value
2018-07-26T15:08:25.770908+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
2018-07-26T15:08:25.770910+00:00 app[web.1]: rv = self.dispatch_request()
2018-07-26T15:08:25.770911+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
2018-07-26T15:08:25.770913+00:00 app[web.1]: return self.view_functions[rule.endpoint](**req.view_args)
2018-07-26T15:08:25.770914+00:00 app[web.1]: File "/app/err_test.py", line 115, in sanity_check
2018-07-26T15:08:25.770916+00:00 app[web.1]: png = some_long_calculation()
2018-07-26T15:08:25.770918+00:00 app[web.1]: File "/app/err_test.py", line 89, in some_long_calculation
2018-07-26T15:08:25.770919+00:00 app[web.1]: driver = create_chromedriver('test')
2018-07-26T15:08:25.770921+00:00 app[web.1]: File "/app/err_test.py", line 78, in create_chromedriver
2018-07-26T15:08:25.770923+00:00 app[web.1]: return webdriver.Chrome(executable_path=CHROMEDRIVER_PATH, options=options)
2018-07-26T15:08:25.770925+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 75, in __init__
2018-07-26T15:08:25.770926+00:00 app[web.1]: desired_capabilities=desired_capabilities)
2018-07-26T15:08:25.770928+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 156, in __init__
2018-07-26T15:08:25.770929+00:00 app[web.1]: self.start_session(capabilities, browser_profile)
2018-07-26T15:08:25.770931+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 251, in start_session
2018-07-26T15:08:25.770933+00:00 app[web.1]: response = self.execute(Command.NEW_SESSION, parameters)
2018-07-26T15:08:25.770934+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 320, in execute
2018-07-26T15:08:25.770936+00:00 app[web.1]: self.error_handler.check_response(response)
2018-07-26T15:08:25.770937+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
2018-07-26T15:08:25.770939+00:00 app[web.1]: raise exception_class(message, screen, stacktrace)
2018-07-26T15:08:25.770944+00:00 app[web.1]: selenium.common.exceptions.SessionNotCreatedException: Message: session not created exception
2018-07-26T15:08:25.770946+00:00 app[web.1]: from tab crashed
2018-07-26T15:08:25.770948+00:00 app[web.1]: (Session info: headless chrome=68.0.3440.75)
2018-07-26T15:08:25.770949+00:00 app[web.1]: (Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.4.0-1019-aws x86_64)
2018-07-26T15:08:25.771063+00:00 app[web.1]:
2018-07-26T15:08:25.773980+00:00 app[web.1]: 10.30.235.45 - - [26/Jul/2018:15:08:25 +0000] "GET / HTTP/1.1" 500 291 "https://dashboard.heroku.com/" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
How can I get this working?
You can download my project for both windows and heroku use at:
https://github.com/kc1/mobiletest
(keep in mind that if you deploy to heroku you have to set FLASK_CONFIG to production. Also you will need to add the 3 buildpacks shown in the screenshot.)

"TypeError: no implicit conversion of nil into String" when eager loading results

I'm using ruby '2.3.0' and 'rails', '3.2.22.2'.
I need a little help & explanations about a query I've made. Here's my models:
class AssessmentRaw < ActiveRecord::Base
belongs_to :session
has_many :schedulers, :class_name => 'MailingScheduler', :as => :owner, :dependent => :destroy
end
class MailingScheduler < ActiveRecord::Base
belongs_to :owner, :polymorphic => true
end
class Session < ActiveRecord::Base
has_many :assessment_raws, :dependent => :destroy
end
I want to retrieve all the assessment_raws, and eager load the associated sessions and mailing_schedulers.
1. eager load only sessions
ars = AssessmentRaw.includes(:session).where("sessions.start_at >= ?", 1.year.ago).limit(10)
ars.map { |ar| ar.session.id }
=> [2877, 2878, 2879, 2880, 2881, 2882, 2883, 2884, 2902, 2903]
`ars.map { |ar| ar.schedulers.try(:size) }`
MailingScheduler Load (0.6ms) SELECT "mailing_schedulers".* FROM "mailing_schedulers" WHERE "mailing_schedulers"."owner_id" = 622 AND "mailing_schedulers"."owner_type" = 'AssessmentRaw'
MailingScheduler Load (0.6ms) SELECT "mailing_schedulers".* FROM "mailing_schedulers" WHERE "mailing_schedulers"."owner_id" = 725 AND "mailing_schedulers"."owner_type" = 'AssessmentRaw'
MailingScheduler Load (0.3ms) SELECT "mailing_schedulers".* FROM "mailing_schedulers" WHERE "mailing_schedulers"."owner_id" = 771 AND "mailing_schedulers"."owner_type" = 'AssessmentRaw'
MailingScheduler Load (0.3ms) SELECT "mailing_schedulers".* FROM "mailing_schedulers" WHERE "mailing_schedulers"."owner_id" = 782 AND "mailing_schedulers"."owner_type" = 'AssessmentRaw'
MailingScheduler Load (0.3ms) SELECT "mailing_schedulers".* FROM "mailing_schedulers" WHERE "mailing_schedulers"."owner_id" = 881 AND "mailing_schedulers"."owner_type" = 'AssessmentRaw'
MailingScheduler Load (0.2ms) SELECT "mailing_schedulers".* FROM "mailing_schedulers" WHERE "mailing_schedulers"."owner_id" = 996 AND "mailing_schedulers"."owner_type" = 'AssessmentRaw'
MailingScheduler Load (0.3ms) SELECT "mailing_schedulers".* FROM "mailing_schedulers" WHERE "mailing_schedulers"."owner_id" = 1087 AND "mailing_schedulers"."owner_type" = 'AssessmentRaw'
MailingScheduler Load (0.3ms) SELECT "mailing_schedulers".* FROM "mailing_schedulers" WHERE "mailing_schedulers"."owner_id" = 1155 AND "mailing_schedulers"."owner_type" = 'AssessmentRaw'
MailingScheduler Load (0.2ms) SELECT "mailing_schedulers".* FROM "mailing_schedulers" WHERE "mailing_schedulers"."owner_id" = 653 AND "mailing_schedulers"."owner_type" = 'AssessmentRaw'
MailingScheduler Load (0.2ms) SELECT "mailing_schedulers".* FROM "mailing_schedulers" WHERE "mailing_schedulers"."owner_id" = 940 AND "mailing_schedulers"."owner_type" = 'AssessmentRaw'
=> [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Of course to get the count of the mailing_schedulers, rails must query (N+1 problem)
2. eager load sessions and mailing_schedulers
ars = AssessmentRaw.includes(:schedulers,:session).where("sessions.start_at >= ?", 1.year.ago).limit(10)
TypeError: no implicit conversion of nil into String
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/arel-3.0.3/lib/arel.rb:40:in `initialize'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/arel-3.0.3/lib/arel.rb:40:in `new'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/arel-3.0.3/lib/arel.rb:40:in `sql'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/associations/join_helper.rb:47:in `block in sanitize'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/associations/join_helper.rb:45:in `map'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/associations/join_helper.rb:45:in `sanitize'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/associations/join_dependency/join_association.rb:104:in `block in join_to'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/associations/join_dependency/join_association.rb:74:in `each'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/associations/join_dependency/join_association.rb:74:in `each_with_index'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/associations/join_dependency/join_association.rb:74:in `join_to'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/relation/query_methods.rb:370:in `block in build_joins'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/relation/query_methods.rb:369:in `each'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/relation/query_methods.rb:369:in `build_joins'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/relation/query_methods.rb:266:in `build_arel'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/relation/query_methods.rb:260:in `arel'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/relation/finder_methods.rb:259:in `construct_limited_ids_condition'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/relation/finder_methods.rb:243:in `apply_join_dependency'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/relation/finder_methods.rb:232:in `construct_relation_for_association_find'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/relation/finder_methods.rb:211:in `find_with_associations'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/relation.rb:171:in `exec_queries'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/relation.rb:160:in `block in to_a'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/explain.rb:41:in `logging_query_plan'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/relation.rb:159:in `to_a'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/activerecord-3.2.22.2/lib/active_record/relation.rb:498:in `inspect'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/railties-3.2.22.2/lib/rails/commands/console.rb:47:in `start'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/railties-3.2.22.2/lib/rails/commands/console.rb:8:in `start'
from /Users/oim/.rbenv/versions/2.3.0/gemsets/project-gems/gems/railties-3.2.22.2/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'irb(main):064:0>
ouch. I think I need a LEFT OUTER JOIN here because all assessment_raws doesn't have mailing_schedulers, right?
Any help appreciated.
This issue occurs due to a change made in Ruby 2.3 where Hash now responds to to_proc which confuses the interpolate method. See this bug report for more details: https://github.com/rails/rails/issues/25010. Also note there is a workaround mentioned which resolved the issue for me, but unless you're sure you don't use the new to_proc it could potentially be dangerous.
What worked for me: I added the suggested monkey patch (as shown below) to the top of my config/application.rb
class Hash
undef_method :to_proc if self.method_defined?(:to_proc)
end

Heroku Application Error Occur

Heroku Application error
I don't understand why this will be happen.Can anyone tell me why this will be happening...?
Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
Logs
2014-01-15T09:12:41.883290+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2014-01-15T09:12:41.883290+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
2014-01-15T09:12:41.883290+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
2014-01-15T09:12:41.883290+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2014-01-15T09:12:41.883290+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2014-01-15T09:12:41.883290+00:00 app[web.1]: from /app/config.ru:in `new'
2014-01-15T09:12:41.883290+00:00 app[web.1]: from /app/config.ru:in `<main>'
2014-01-15T09:12:41.883290+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
2014-01-15T09:12:41.883290+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
2014-01-15T09:12:41.882761+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
2014-01-15T09:12:41.883457+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2014-01-15T09:12:41.883457+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2014-01-15T09:12:41.883457+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2014-01-15T09:12:41.883457+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2014-01-15T09:12:41.883457+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2014-01-15T09:12:41.883457+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands/server.rb:48:in `app'
2014-01-15T09:12:41.883457+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2014-01-15T09:12:41.883457+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in <top (required)>'
2014-01-15T09:12:41.883457+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
2014-01-15T09:12:41.883859+00:00 app[web.1]: from bin/rails:4:in `require'
2014-01-15T09:12:41.883457+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands/server.rb:75:in `start'
2014-01-15T09:12:41.883859+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
2014-01-15T09:12:41.883859+00:00 app[web.1]: from bin/rails:4:in `<main>'
2014-01-15T09:12:41.913025+00:00 app[web.1]: => Booting WEBrick
2014-01-15T09:12:41.913025+00:00 app[web.1]: => Rails 4.0.2 application starting in production on http://0.0.0.0:49194
2014-01-15T09:12:41.913025+00:00 app[web.1]: => Run `rails server -h` for more startup options
2014-01-15T09:12:41.913025+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-01-15T09:12:41.913025+00:00 app[web.1]: Exiting
2014-01-15T09:12:43.365057+00:00 heroku[web.1]: Process exited with status 1
2014-01-15T09:12:43.388570+00:00 heroku[web.1]: State changed from starting to crashed
2014-01-15T09:34:57.545417+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=scitech.herokuapp.com fwd="39.36.135.145" dyno= connect= service= status=503 bytes=
2014-01-15T09:34:58.737978+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=scitech.herokuapp.com fwd="39.36.135.145" dyno= connect= service= status=503 bytes=
2014-01-15T09:39:33.012548+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=scitech.herokuapp.com fwd="39.42.60.156" dyno= connect= service= status=503 bytes=
2014-01-15T09:39:37.499410+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=scitech.herokuapp.com fwd="39.42.60.156" dyno= connect= service= status=503 bytes=
2014-01-15T09:39:37.937049+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=scitech.herokuapp.com fwd="39.42.60.156" dyno= connect= service= status=503 bytes=
2014-01-15T09:39:31.872794+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=scitech.herokuapp.com fwd="39.42.60.156" dyno= connect= service= status=503 bytes=
2014-01-15T09:40:42.463904+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=scitech.herokuapp.com fwd="39.42.60.156" dyno= connect= service= status=503 bytes=
2014-01-15T09:40:43.143297+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=scitech.herokuapp.com fwd="39.42.60.156" dyno= connect= service= status=503 bytes=
2014-01-15T09:43:54.807645+00:00 heroku[web.1]: State changed from crashed to starting
2014-01-15T09:43:57.879492+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 4381 -e $RAILS_ENV`
2014-01-15T09:44:00.873725+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require': /app/app/models/banners.rb:2: syntax error, unexpected tIDENTIFIER, expecting '}' (SyntaxError)
2014-01-15T09:44:00.874065+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
2014-01-15T09:44:00.874065+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
2014-01-15T09:44:00.874065+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
2014-01-15T09:44:00.873725+00:00 app[web.1]: validates :title, presence: true, length: {minimum: 5 maximum: 25}
2014-01-15T09:44:00.873725+00:00 app[web.1]: ^
2014-01-15T09:44:00.873725+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
2014-01-15T09:44:00.874393+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
2014-01-15T09:44:00.873725+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
2014-01-15T09:44:00.873725+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
2014-01-15T09:44:00.873725+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:330:in `require_or_load'
2014-01-15T09:44:00.873725+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:289:in `depend_on'
2014-01-15T09:44:00.873725+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:207:in `require_dependency'
2014-01-15T09:44:00.873725+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:465:in `block (2 levels) in eager_load!'
2014-01-15T09:44:00.874065+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:464:in `each'
2014-01-15T09:44:00.874065+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:464:in `block in eager_load!'
2014-01-15T09:44:00.874065+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:462:in `each'
2014-01-15T09:44:00.874065+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:462:in `eager_load!'
2014-01-15T09:44:00.874065+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:347:in `eager_load!'
2014-01-15T09:44:00.874065+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application/finisher.rb:56:in `each'
2014-01-15T09:44:00.874065+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
2014-01-15T09:44:00.874393+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
2014-01-15T09:44:00.874393+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
2014-01-15T09:44:00.874393+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
2014-01-15T09:44:00.874393+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each'
2014-01-15T09:44:00.874393+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
2014-01-15T09:44:00.874393+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
2014-01-15T09:44:00.874393+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
2014-01-15T09:44:00.874393+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
2014-01-15T09:44:00.874393+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
2014-01-15T09:44:00.875246+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2014-01-15T09:44:00.875246+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
2014-01-15T09:44:00.875246+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
2014-01-15T09:44:00.875246+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
2014-01-15T09:44:00.875246+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
2014-01-15T09:44:00.875246+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2014-01-15T09:44:00.875246+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2014-01-15T09:44:00.875246+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2014-01-15T09:44:00.875246+00:00 app[web.1]: from /app/config.ru:in `new'
2014-01-15T09:44:00.875246+00:00 app[web.1]: from /app/config.ru:in `<main>'
2014-01-15T09:44:00.875456+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2014-01-15T09:44:00.875456+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2014-01-15T09:44:00.875456+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2014-01-15T09:44:00.875456+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2014-01-15T09:44:00.875456+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2014-01-15T09:44:00.875456+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands/server.rb:48:in `app'
2014-01-15T09:44:00.875456+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2014-01-15T09:44:00.875456+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands/server.rb:75:in `start'
2014-01-15T09:44:00.875456+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in <top (required)>'
2014-01-15T09:44:00.875456+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
2014-01-15T09:44:00.875890+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
2014-01-15T09:44:00.875890+00:00 app[web.1]: from bin/rails:4:in `<main>'
2014-01-15T09:44:00.898780+00:00 app[web.1]: => Booting WEBrick
2014-01-15T09:44:00.898780+00:00 app[web.1]: => Rails 4.0.2 application starting in production on http://0.0.0.0:4381
2014-01-15T09:44:00.898780+00:00 app[web.1]: => Run `rails server -h` for more startup options
2014-01-15T09:44:00.898780+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-01-15T09:44:00.898780+00:00 app[web.1]: Exiting
2014-01-15T09:44:00.875890+00:00 app[web.1]: from bin/rails:4:in `require'
2014-01-15T09:44:02.058347+00:00 heroku[web.1]: Process exited with status 1
2014-01-15T09:44:02.077676+00:00 heroku[web.1]: State changed from starting to crashed
2014-01-15T09:44:13.799826+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=scitech.herokuapp.com fwd="39.42.60.156" dyno= connect= service= status=503 bytes=
You have a syntax error in the banners.rb file. Line validates :title, presence: true, length: {minimum: 5 maximum: 25} should be
validates :title, presence: true, length: {minimum: 5, maximum: 25}

NoMethodError: undefined method `Amount' for nil:NilClass

:031:0> #revenue = Revenue.where(:Year=>1983)
←[1m←[36mRevenue Load (1.0ms)←[0m ←[1mSELECT "revenues".* FROM "revenues" WHERE "revenues"."Year" = 1983←[0m
=> [#<Revenue id: 9, Year: 1983, Amount: 4.0, Q1: 1.0, Q2: 1.0, Q3: 1.0, Q4: 1.0
, created_at: "2013-06-11 16:41:16", updated_at: "2013-06-11 16:41:16", estate_i
d: 1>]
irb(main):032:0> #revenues.Amount
NoMethodError: undefined method `Amount' for nil:NilClass
from (irb):32
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1
3/lib/rails/commands/console.rb:47:in `start'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1
3/lib/rails/commands/console.rb:8:in `start'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1
3/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
irb(main):033:0>
Because your revenue object is in #revenue and you are trying #revenues.Amount
so try it #revenue.amount

query not working in heroku

I run this on my local machine it works fine...but when I upload to heroku
I get an error 500 something when wrong
settings controller
class SettingsController < ApplicationController
before_filter :confirm_logged_in
def company
#company = User.company
#user_id = session[:user_id]
#user_name = session[:name]
#companies = Company.where(:user_id => #user_id)
end
end
setting view
<% #companies.each do |company| %>
<div id="media">
<span class="lop">
<%= image_tag company.logo.url (:small) %>
</span>
<% end>
I check heroku logs this is what I get...any ideas
2011-02-18T01:09:24-08:00 app[web.1]: Started GET "/settings/company" for 69.137
.99.169 at Fri Feb 18 01:09:24 -0800 2011
2011-02-18T01:09:24-08:00 app[web.1]: Processing by SettingsController#company
as HTML
2011-02-18T01:09:24-08:00 app[web.1]: /app/928a2790-dfe4-4726-8793-1fa99837495b/
home/app/views/settings/company.html.erb:14: warning: don't put space before arg
ument parentheses
2011-02-18T01:09:24-08:00 app[web.1]: Rendered settings/_menu.html.erb (2.1ms)
2011-02-18T01:09:24-08:00 app[web.1]: Rendered settings/company.html.erb within
layouts/application (6.8ms)
2011-02-18T01:09:24-08:00 app[web.1]: Completed in 22ms
2011-02-18T01:09:24-08:00 app[web.1]:
2011-02-18T01:09:24-08:00 app[web.1]: ActionView::Template::Error (PGError: ERRO
R: operator does not exist: text = integer
2011-02-18T01:09:24-08:00 app[web.1]: LINE 1: ...ompanies".* FROM "companies" WH
ERE "companies"."user_id" = 3
2011-02-18T01:09:24-08:00 app[web.1]:
^
2011-02-18T01:09:24-08:00 app[web.1]: HINT: No operator matches the given name
and argument type(s). You might need to add explicit type casts.
2011-02-18T01:09:24-08:00 app[web.1]: : SELECT "companies".* FROM "companies" WH
ERE "companies"."user_id" = 3):
2011-02-18T01:09:24-08:00 app[web.1]: 8:
2011-02-18T01:09:24-08:00 app[web.1]: 9:
2011-02-18T01:09:24-08:00 app[web.1]: 10:
2011-02-18T01:09:24-08:00 app[web.1]: 11:
2011-02-18T01:09:24-08:00 app[web.1]: 12:
2011-02-18T01:09:24-08:00 app[web.1]: 13:
2011-02-18T01:09:24-08:00 app[web.1]: 14:
2011-02-18T01:09:24-08:00 app[web.1]: app/views/settings/company.html.erb:11:i
n `_app_views_settings_company_html_erb___121502233_23577600314100_0'
2011-02-18T01:09:24-08:00 app[web.1]:
2011-02-18T01:09:24-08:00 app[web.1]:
2011-02-18T01:09:24-08:00 heroku[router]: GET miso3.heroku.com/settings/company
dyno=web.1 queue=0 wait=0ms service=36ms bytes=934
2011-02-18T01:09:24-08:00 heroku[nginx]: GET /settings/company HTTP/1.1 | 69.137
.99.169 | 965 | http | 500
2011-02-18T01:33:03-08:00 app[web.1]:
2011-02-18T01:33:03-08:00 app[web.1]:
2011-02-18T01:33:03-08:00 app[web.1]: Started GET "/settings/company" for 69.137
.99.169 at Fri Feb 18 01:33:03 -0800 2011
2011-02-18T01:33:03-08:00 app[web.1]: Processing by SettingsController#company
as HTML
2011-02-18T01:33:03-08:00 app[web.1]: Rendered settings/_menu.html.erb (1.5ms)
2011-02-18T01:33:03-08:00 app[web.1]: Rendered settings/company.html.erb within
layouts/application (3.9ms)
2011-02-18T01:33:03-08:00 app[web.1]: Completed in 5ms
2011-02-18T01:33:03-08:00 app[web.1]:
2011-02-18T01:33:03-08:00 app[web.1]: ActionView::Template::Error (PGError: ERRO
R: operator does not exist: text = integer
2011-02-18T01:33:03-08:00 app[web.1]: LINE 1: ...ompanies".* FROM "companies" WH
ERE "companies"."user_id" = 3
2011-02-18T01:33:03-08:00 app[web.1]:
^
2011-02-18T01:33:03-08:00 app[web.1]: HINT: No operator matches the given name
and argument type(s). You might need to add explicit type casts.
2011-02-18T01:33:03-08:00 app[web.1]: : SELECT "companies".* FROM "companies" WH
ERE "companies"."user_id" = 3):
2011-02-18T01:33:03-08:00 app[web.1]: 8:
2011-02-18T01:33:03-08:00 app[web.1]: 9:
2011-02-18T01:33:03-08:00 app[web.1]: 10:
2011-02-18T01:33:03-08:00 app[web.1]: 11:
2011-02-18T01:33:03-08:00 app[web.1]: 12:
2011-02-18T01:33:03-08:00 app[web.1]: 13:
2011-02-18T01:33:03-08:00 app[web.1]: 14:
2011-02-18T01:33:03-08:00 app[web.1]: app/views/settings/company.html.erb:11:i
n `_app_views_settings_company_html_erb___121502233_23577600314100_0'
2011-02-18T01:33:03-08:00 app[web.1]:
2011-02-18T01:33:03-08:00 app[web.1]:
2011-02-18T01:33:03-08:00 heroku[router]: GET miso3.heroku.com/settings/company
dyno=web.1 queue=0 wait=0ms service=20ms bytes=934
2011-02-18T01:33:03-08:00 heroku[nginx]: GET /settings/company HTTP/1.1 | 69.137
.99.169 | 965 | http | 500