I'm building an application which creates PDF documents with maps of trips created by the users. It has two stages:
Personalization - users choose points of interests.
Finalization - users enter their e-mail address, we generate PDF maps and finalize the process by sending e-mail with a download link.
I have a problem with the second stage of the process. I get an error when requesting to generate a PDF.
In logs:
app[worker.1]: Starting to finalize PDF no #3384
app[worker.1]: Generating pdf url:/pdfs/new.json?id=3384&token=abcdeyd
app[web.2]: Started GET "/pdfs/new.json?id=3384&token=abcdeyd"
After few seconds I get:
heroku[router]: at=error code=H12 desc="Request timeout" method=GET path=/pdfs/new.json?id=3384&token=abcdeyd" host= fwd= dyno=web.2 queue=0ms wait=0ms connect=1ms service=30000ms status=503 bytes=0
And then:
[Worker(host:pid:2)] Trip#finalize_without_delay! failed with MultiJson::DecodeError: 795: unexpected token at '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
app[worker.1]: <html>
app[worker.1]: <head>
app[worker.1]: <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
app[worker.1]: <style type="text/css">
app[worker.1]: html, body, iframe { margin: 0; padding: 0; height: 100%; }
app[worker.1]: iframe { display: block; width: 100%; border: none; }
app[worker.1]: </style>
app[worker.1]: <title>Application Error</title></head>
app[worker.1]: </head>
app[worker.1]: <body>
app[worker.1]: <iframe src="//s3.amazonaws.com/heroku_pages/error.html">
app[worker.1]: <p>Application Error</p>
app[worker.1]: </iframe>
app[worker.1]: </body>
app[worker.1]: </html>' - 0 failed attempts
From the user's side, it goes like this:
app[web.1]: Started GET "/pdfs/3384"
app[web.1]: OpenURI::HTTPError (403 Forbidden):
app[web.1]: app/controllers/pdfs_controller.rb:52:in `show'
And the weirdest part of this is that when I actually tried downloading the PDF after about 30-40 minutes, everything went well and I downloaded it to my computer.
app[web.1]: cache: [GET /pdfs/3384] miss
app[web.1]: Processing by PdfsController#show as HTML
app[web.1]: Parameters: {"id"=>"3384"}
app[web.1]: Completed 200 OK in 2101ms (Views: 0.9ms | ActiveRecord: 7.4ms | Solr: 0.0ms)
heroku[router]: at=info method=GET path=/pdfs/3384 dyno=web.1 queue=0 wait=1ms connect=1ms service=4220ms status=200 bytes=13825239
I'd be very thankful for any suggestions. Please ask if something isn't clear enough.
Greetings
Related
When I deploy my app to Heroku I am getting an error page saying "We're sorry, but something went wrong." I add puma to my gem file in order to run the server there. Unfortunately that didn't fix the issue. I'm working in Cloud 9 IDE. The logs are posted below. Can anyone assist?
> freshmurry:~/workspace (master) $ heroku logs --tail
> WARNING: This is the legacy Heroku CLI with limited functionality. Please install the latest CLI.
> WARNING: Installation instructions are at https://cli.heroku.com
> 2017-06-12T14:42:28.118206+00:00 app[web.1]: => Ctrl-C to shutdown server
> 2017-06-12T14:42:28.118197+00:00 app[web.1]: => Rails 4.2.6 application starting in production on http://0.0.0.0:7296
> 2017-06-12T14:42:28.118218+00:00 app[web.1]: [4] Puma starting in cluster mode...
> 2017-06-12T14:42:28.118219+00:00 app[web.1]: [4] * Version 3.9.1 (ruby 2.2.2-p95), codename: Private Caller
> 2017-06-12T14:42:28.118220+00:00 app[web.1]: [4] * Min threads: 1, max threads: 1
> 2017-06-12T14:42:28.118223+00:00 app[web.1]: [4] * Process workers: 2
> 2017-06-12T14:42:28.118221+00:00 app[web.1]: [4] * Environment: production
> 2017-06-12T14:42:28.118246+00:00 app[web.1]: [4] * Preloading application
> 2017-06-12T14:42:28.118403+00:00 app[web.1]: [4] * Listening on tcp://0.0.0.0:7296
> 2017-06-12T14:42:28.127987+00:00 app[web.1]: [4] - Worker 0 (pid: 7) booted, phase: 0
> 2017-06-12T14:42:28.118634+00:00 app[web.1]: [4] Use Ctrl-C to stop
> 2017-06-12T14:42:28.138176+00:00 app[web.1]: [4] - Worker 1 (pid: 12) booted, phase: 0
> 2017-06-12T14:42:28.468279+00:00 heroku[web.1]: State changed from starting to up
> 2017-06-12T14:43:21.618239+00:00 app[web.1]: Started GET "/" for 165.225.0.80 at 2017-06-12 14:43:21 +0000
> 2017-06-12T14:43:21.661531+00:00 app[web.1]: Processing by ProductsController#index as HTML
> 2017-06-12T14:43:21.676339+00:00 app[web.1]: Product Load (1.5ms) SELECT "products".* FROM "products"
> 2017-06-12T14:43:51.612669+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/"
> host=songchordz.herokuapp.com
> request_id=a209d2c5-1519-4829-b03f-8ad410a36cc7 fwd="165.225.0.80"
> dyno=web.1 connect=1ms service=30000ms status=503 bytes=0
> protocol=https
> 2017-06-12T14:43:51.738309+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=songchordz.herokuapp.com
> request_id=716c5e18-d421-49fd-9c3f-a1b406ef950d fwd="165.225.0.80"
> dyno=web.1 connect=1ms service=11ms status=200 bytes=188
> protocol=https
> 2017-06-12T14:44:19.815485+00:00 app[web.1]: Rendered products/index.html.erb within layouts/application (58144.2ms)
> 2017-06-12T14:44:19.815964+00:00 app[web.1]: Completed 500 Internal Server Error in 58154ms (ActiveRecord: 7.1ms)
> 2017-06-12T14:44:19.819108+00:00 app[web.1]:
> 2017-06-12T14:44:19.819110+00:00 app[web.1]: ActionView::Template::Error (Invalid CSS after "... background: ":
> expected "{", was "url('/assets/si..."):
> 2017-06-12T14:44:19.819112+00:00 app[web.1]: 13: <div class="product clearfix">
> 2017-06-12T14:44:19.819113+00:00 app[web.1]: 14: <a href="<%= product_path(product)%>">
> 2017-06-12T14:44:19.819113+00:00 app[web.1]: 15: <div class="product-image-container">
> 2017-06-12T14:44:19.819114+00:00 app[web.1]: 16: <img src="<%= asset_path product.thumbnail_image_name %>" alt="<%=
> product.title %>"/>
> 2017-06-12T14:44:19.819115+00:00 app[web.1]: 17: <span class="product-price">$<%= product.price %></span>
> 2017-06-12T14:44:19.819116+00:00 app[web.1]: 18: </div>
> 2017-06-12T14:44:19.819117+00:00 app[web.1]: 19: <p class="product-title"><%= product.title %></p></a>
> 2017-06-12T14:44:19.819118+00:00 app[web.1]: app/views/products/index.html.erb:16:in `block in
> _app_views_products_index_html_erb__2962215687888486859_70188315801060'
> 2017-06-12T14:44:19.819118+00:00 app[web.1]: app/views/products/index.html.erb:12:in
> `_app_views_products_index_html_erb__2962215687888486859_70188315801060'
> 2017-06-12T14:44:19.819120+00:00 app[web.1]:
> 2017-06-12T14:44:19.819119+00:00 app[web.1]:
> 2017-06-12T14:50:12.196944+00:00 app[web.1]: Started GET "/" for 165.225.0.83 at 2017-06-12 14:50:12 +0000
> 2017-06-12T14:50:12.246560+00:00 app[web.1]: Processing by ProductsController#index as HTML
> 2017-06-12T14:50:12.260255+00:00 app[web.1]: Product Load (1.6ms) SELECT "products".* FROM "products"
> 2017-06-12T14:50:18.705756+00:00 heroku[router]: at=info method=GET path="/" host=songchordz.herokuapp.com
> request_id=cb4de3d8-9abf-4c68-b7b3-08247b55c803 fwd="165.225.0.83"
> dyno=web.1 connect=2ms service=6512ms status=500 bytes=1714
> protocol=https
> 2017-06-12T14:50:18.758818+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=songchordz.herokuapp.com
> request_id=aa8706d9-9053-40ee-b586-c95a2324af8d fwd="165.225.0.83"
> dyno=web.1 connect=1ms service=2ms status=304 bytes=93 protocol=https
> 2017-06-12T14:50:18.706025+00:00 app[web.1]: 14: <a href="<%= product_path(product)%>">
> 2017-06-12T14:50:18.704334+00:00 app[web.1]: Completed 500 Internal Server Error in 6458ms (ActiveRecord: 9.5ms)
> 2017-06-12T14:50:18.706028+00:00 app[web.1]: 18: </div>
> 2017-06-12T14:50:18.706020+00:00 app[web.1]:
> 2017-06-12T14:50:18.704044+00:00 app[web.1]: Rendered products/index.html.erb within layouts/application (6448.0ms)
> 2017-06-12T14:50:18.706026+00:00 app[web.1]: 15: <div class="product-image-container">
> 2017-06-12T14:50:18.706026+00:00 app[web.1]: 16: <img src="<%= asset_path product.thumbnail_image_name %>" alt="<%=
> product.title %>"/>
> 2017-06-12T14:50:18.706024+00:00 app[web.1]: 13: <div class="product clearfix">
> 2017-06-12T14:50:18.706027+00:00 app[web.1]: 17: <span class="product-price">$<%= product.price %></span>
> 2017-06-12T14:50:18.706023+00:00 app[web.1]: ActionView::Template::Error (Invalid CSS after "... background: ":
> expected "{", was "url('/assets/si..."):
> 2017-06-12T14:50:18.706029+00:00 app[web.1]: 19: <p class="product-title"><%= product.title %></p></a>
> 2017-06-12T14:50:18.706030+00:00 app[web.1]: app/views/products/index.html.erb:16:in `block in
> _app_views_products_index_html_erb__2962215687888486859_70188315745620'
> 2017-06-12T14:50:18.706031+00:00 app[web.1]: app/views/products/index.html.erb:12:in
> `_app_views_products_index_html_erb__2962215687888486859_70188315745620'
> 2017-06-12T14:50:18.706031+00:00 app[web.1]:
> 2017-06-12T14:50:18.706032+00:00 app[web.1]:
> 2017-06-12T15:00:09.000000+00:00 app[api]: Build started by user user#yahoo.com
> 2017-06-12T15:00:26.386944+00:00 app[api]: Release v35 created by user user#yahoo.com
> 2017-06-12T15:00:26.386944+00:00 app[api]: Deploy bfdfd983 by user user#yahoo.com
> 2017-06-12T15:00:27.042332+00:00 heroku[web.1]: Restarting
> 2017-06-12T15:00:27.043183+00:00 heroku[web.1]: State changed from up to starting
> 2017-06-12T15:00:09.000000+00:00 app[api]: Build succeeded
> 2017-06-12T15:00:28.141928+00:00 heroku[web.1]: Stopping all processes with SIGTERM
> 2017-06-12T15:00:28.160932+00:00 app[web.1]: [4] - Gracefully shutting down workers...
> 2017-06-12T15:00:28.933799+00:00 app[web.1]: [4] === puma shutdown: 2017-06-12 15:00:28 +0000 ===
> 2017-06-12T15:00:28.933814+00:00 app[web.1]: [4] - Goodbye!
> 2017-06-12T15:00:28.933834+00:00 app[web.1]: Exiting
> 2017-06-12T15:00:29.287412+00:00 heroku[web.1]: Process exited with status 0
> 2017-06-12T15:00:33.688417+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 10601 -e production`
> 2017-06-12T15:00:42.161643+00:00 app[web.1]: => Booting Puma
> 2017-06-12T15:00:42.161681+00:00 app[web.1]: => Rails 4.2.6 application starting in production on http://0.0.0.0:10601
> 2017-06-12T15:00:42.161691+00:00 app[web.1]: => Run `rails server -h` for more startup options
> 2017-06-12T15:00:42.161692+00:00 app[web.1]: => Ctrl-C to shutdown server
> 2017-06-12T15:00:42.161754+00:00 app[web.1]: [4] Puma starting in cluster mode...
> 2017-06-12T15:00:42.161823+00:00 app[web.1]: [4] * Version 3.9.1 (ruby 2.2.2-p95), codename: Private Caller
> 2017-06-12T15:00:42.161864+00:00 app[web.1]: [4] * Min threads: 1, max threads: 1
> 2017-06-12T15:00:42.161937+00:00 app[web.1]: [4] * Environment: production
> 2017-06-12T15:00:42.161980+00:00 app[web.1]: [4] * Process workers: 2
> 2017-06-12T15:00:42.162025+00:00 app[web.1]: [4] * Preloading application
> 2017-06-12T15:00:42.162303+00:00 app[web.1]: [4] * Listening on tcp://0.0.0.0:10601
> 2017-06-12T15:00:42.162802+00:00 app[web.1]: [4] Use Ctrl-C to stop
> 2017-06-12T15:00:42.175712+00:00 app[web.1]: [4] - Worker 0 (pid: 7) booted, phase: 0
> 2017-06-12T15:00:42.178719+00:00 app[web.1]: [4] - Worker 1 (pid: 9) booted, phase: 0
> 2017-06-12T15:00:42.741234+00:00 heroku[web.1]: State changed from starting to up
> 2017-06-12T15:03:34.480518+00:00 app[web.1]: Started GET "/" for 165.225.0.80 at 2017-06-12 15:03:34 +0000
> 2017-06-12T15:03:34.535895+00:00 app[web.1]: Processing by ProductsController#index as HTML
> 2017-06-12T15:03:34.556604+00:00 app[web.1]: Product Load (1.7ms) SELECT "products".* FROM "products"
> 2017-06-12T15:04:04.458759+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/"
> host=songchordz.herokuapp.com
> request_id=99da6242-45eb-4039-b35c-770b1594beec fwd="165.225.0.80"
> dyno=web.1 connect=0ms service=30001ms status=503 bytes=0
> protocol=https
> 2017-06-12T15:04:34.582637+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/favicon.ico"
> host=songchordz.herokuapp.com
> request_id=734596fb-2cb9-4bd4-9cc5-4fc85c747ed5 fwd="165.225.0.80"
> dyno=web.1 connect=0ms service=30001ms status=503 bytes=0
> protocol=https
> 2017-06-12T15:04:49.462061+00:00 app[web.1]: Rendered products/index.html.erb within layouts/application (74910.8ms)
> 2017-06-12T15:04:49.467310+00:00 app[web.1]: Completed 500 Internal Server Error in 74931ms (ActiveRecord: 6.5ms)
> 2017-06-12T15:04:49.470398+00:00 app[web.1]:
> 2017-06-12T15:04:49.470410+00:00 app[web.1]: ActionView::Template::Error (Invalid CSS after "... background: ":
> expected "{", was "url('/assets/si..."):
> 2017-06-12T15:04:49.470412+00:00 app[web.1]: 13: <div class="product clearfix">
> 2017-06-12T15:04:49.470414+00:00 app[web.1]: 14: <a href="<%= product_path(product)%>">
> 2017-06-12T15:04:49.470415+00:00 app[web.1]: 15: <div class="product-image-container">
> 2017-06-12T15:04:49.470415+00:00 app[web.1]: 16: <img src="<%= asset_path product.thumbnail_image_name %>" alt="<%=
> product.title %>"/>
> 2017-06-12T15:04:49.470416+00:00 app[web.1]: 17: <span class="product-price">$<%= product.price %></span>
> 2017-06-12T15:04:49.470418+00:00 app[web.1]: 18: </div>
> 2017-06-12T15:04:49.470419+00:00 app[web.1]: 19: <p class="product-title"><%= product.title %></p></a>
> 2017-06-12T15:04:49.470420+00:00 app[web.1]: app/views/products/index.html.erb:16:in `block in
> _app_views_products_index_html_erb__4490733878524225278_70102825789420'
> 2017-06-12T15:04:49.470421+00:00 app[web.1]: app/views/products/index.html.erb:12:in
> `_app_views_products_index_html_erb__4490733878524225278_70102825789420'
> 2017-06-12T15:04:49.470421+00:00 app[web.1]:
> 2017-06-12T15:04:49.470422+00:00 app[web.1]:
Anytime you see an error like this:
2017-06-12T15:04:49.470410+00:00 app[web.1]: ActionView::Template::Error (Invalid CSS after "... background: ": > expected "{", was "url('/assets/si..."):
it serves as a clue. The clue is in the term ActionView::Template. Its important to know how the Ruby on Rails framework works for you to understand what is going on. Here is a guide on what is the significance of ActionView:
http://guides.rubyonrails.org/action_view_overview.html
Rails uses this tool called ActionView and what ActionView does is assist in mapping the controllers to the Views, but don't take my word for it, just read the documentation I posted above, in particular this part:
For each controller there is an associated directory in the app/views directory which holds the template files that make up the views associated with that controller. These files are used to display the view that results from each controller action.
So why am I posting this? Well, if you know that ActionView maps the controllers to the views and then you also see the term Template, it serves as a big clue that the problem is in the Views of your Model-Views-Controller application. Isn't awesome how you can isolate the problem with this framework in this manner?
Then there is another clue in that error message, Invalid CSS after...
I think that is the biggest and glaring clue of all. You have invalid CSS and its not rendering in your Views correctly, which is why the terms Template and ActionView appeared on the error scene.
I realize you figured it out eventually, but the answer is also in how you problem solve and not just the fix. Eventually, you are going to run into another error that you can't decipher if you do not know how the Ruby on Rails MVC framework and all of its tools work.
I have deployed my app to heroku but and I can see the app but the app is NOT accessing the mongolab database. I have tried resetting the database in console with
$ heroku run rake db:reset
but I get this error.
failed with error 13: "not authorized on ENV['MONGOID_DATABASE'] to execute command { dropDatabase: 1 }"
See https://github.com/mongodb/mongo/blob/master/docs/errors.md
Not sure what I am doing wrong, I have not setup an app with mongoid on heroku before, this is my first time
-UPDATE-
Here is the end of the log I have that seems to show the post is not working.
$ heroku logs
2015-09-25T16:20:15.770927+00:00 heroku[router]: at=info method=POST path="/managers" host=beta.herokuapp.com request_id=95709038-02e9-45b1-8300-0aebc287f6c1 fwd="162.239.42.196" dyno=web.1 connect=0ms service=178ms status=500 bytes=1480
2015-09-25T16:20:15.770408+00:00 app[web.1]: D, [2015-09-25T16:20:15.770342 #3] DEBUG -- : MOPED: 10.152.165.9:29821 QUERY database=ENV['MONGOID_DATABASE'] collection=managers selector={"email"=>"sample#email.com"} flags=[] limit=-1 skip=0 batch_size=nil fields={:_id=>1} runtime: 1.0352ms
Here are the router logs...
$ heroku logs --ps router
2015-09-25T20:40:46.935184+00:00 heroku[router]: at=info method=POST path="/managers" host=beta.herokuapp.com request_id=c1673463-a69f-4111-bd4d-01fdb5516ad0 fwd="162.239.42.196" dyno=web.1 connect=2ms service=109ms status=500 bytes=1480
2015-09-25T20:40:47.285029+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=beta.herokuapp.com request_id=1e998283-b02b-4cc5-83f6-7996a6991531 fwd="162.239.42.196" dyno=web.1 connect=1ms service=2ms status=200 bytes=143
2015-09-26T04:45:32.833599+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=beta.herokuapp.com request_id=59ccc2e7-18d4-4c08-8b08-a653f5d11714 fwd="2602:30a:2ef2:ac40:acb1:9144:79b4:affb,66.249.88.51" dyno=web.1 connect=1ms service=4ms status=200 bytes=143
I also see it failing to query the database
2015-09-26T05:03:39.852170+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"WVGY+XLD...A=", "manager"=>{"name"=>"Blah Blah", "company"=>"Blah Blah CO.", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Sign up"}
2015-09-26T05:03:40.138442+00:00 app[web.1]: D, [2015-09-26T05:03:40.138321 #3] DEBUG -- : MOPED: 10.152.165.9:29821 COMMAND database=admin command={:ismaster=>1} runtime: 23.5306ms
2015-09-26T05:03:40.146776+00:00 app[web.1]: Completed 500 Internal Server Error in 294ms
2015-09-26T05:03:40.146782+00:00 app[web.1]: Completed 500 Internal Server Error in 294ms
2015-09-26T05:03:40.152205+00:00 app[web.1]:
2015-09-26T05:03:40.152208+00:00 app[web.1]: Moped::Errors::QueryFailure (The operation: #<Moped::Protocol::Query
2015-09-26T05:03:40.152209+00:00 app[web.1]: #length=112
2015-09-26T05:03:40.152211+00:00 app[web.1]: #request_id=4
2015-09-26T05:03:40.152212+00:00 app[web.1]: #response_to=0
2015-09-26T05:03:40.152214+00:00 app[web.1]: #op_code=2004
2015-09-26T05:03:40.152215+00:00 app[web.1]: #flags=[]
2015-09-26T05:03:40.152216+00:00 app[web.1]: #full_collection_name="ENV['MONGOID_DATABASE'].managers"
2015-09-26T05:03:40.152218+00:00 app[web.1]: #skip=0
2015-09-26T05:03:40.152219+00:00 app[web.1]: #limit=-1
2015-09-26T05:03:40.152222+00:00 app[web.1]: #selector={"email"=>"sample#email.com"}
2015-09-26T05:03:40.152224+00:00 app[web.1]: #fields={:_id=>1}>
2015-09-26T05:03:40.152225+00:00 app[web.1]: failed with error 13: "not authorized for query on ENV['MONGOID_DATABASE'].managers"
2015-09-26T05:03:40.152227+00:00 app[web.1]:
2015-09-26T05:03:40.152228+00:00 app[web.1]: See https://github.com/mongodb/mongo/blob/master/docs/errors.md
I figured it out. The db was not connecting because the mongoid.yml file was incorrect. I tweaked the yml file and added the URI to the heroku variables and it worked correctly.
I've tried tons of things but can't figure it out... I can't find anything in the heroku logs, what could I be missing? This is the heroku logs..
I think it could be a problem in gemfile or gemfile.lock since it skips the gemfile.lock because of windows I think, but don't see how that would affect anything as it was updating fine earlier, thoughts?
EDIT: I've just realized that on my Huroku the name of my application is pinterestingx(pinterestingx.herokuapp.com) but when I git push heroku master my address bar says omr-pinterestingx.herokuapp.com so they don't match, might this be the problem? How can I solve this?
$ heroku logs
←[36m2014-01-24T05:26:36.093302+00:00 app[web.1]:←[0m bin/rails:4:in `require'
←[36m2014-01-24T05:26:36.093043+00:00 app[web.1]:←[0m /app/vendor/bundle/ruby/
2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
←[36m2014-01-24T05:26:36.093302+00:00 app[web.1]:←[0m [2014-01-24 05:26:36] INFO
going to shutdown ...
←[36m2014-01-24T05:26:36.093302+00:00 app[web.1]:←[0m bin/rails:4:in `<main>'
←[36m2014-01-24T05:26:36.093773+00:00 app[web.1]:←[0m [2014-01-24 05:26:36] INFO
WEBrick::HTTPServer#start done.
←[36m2014-01-24T05:26:36.093773+00:00 app[web.1]:←[0m Exiting
←[36m2014-01-24T05:26:36.562152+00:00 heroku[web.1]:←[0m Starting process with c
ommand `bin/rails server -p 12335 -e $RAILS_ENV`
←[36m2014-01-24T05:26:37.442566+00:00 heroku[web.1]:←[0m Process exited with sta
tus 143
←[36m2014-01-24T05:26:40.284565+00:00 app[web.1]:←[0m [2014-01-24 05:26:40] INFO
ruby 2.0.0 (2013-11-22) [x86_64-linux]
←[36m2014-01-24T05:26:40.284565+00:00 app[web.1]:←[0m [2014-01-24 05:26:40] INFO
WEBrick 1.3.1
←[36m2014-01-24T05:26:40.284565+00:00 app[web.1]:←[0m [2014-01-24 05:26:40] INFO
WEBrick::HTTPServer#start: pid=2 port=12335
←[36m2014-01-24T05:26:40.557417+00:00 heroku[web.1]:←[0m State changed from star
ting to up
←[36m2014-01-24T05:27:17.022181+00:00 app[web.1]:←[0m Started GET "/" for 108.22
7.81.48 at 2014-01-24 05:27:17 +0000
←[36m2014-01-24T05:27:17.022181+00:00 app[web.1]:←[0m => Rails 4.0.0 application
starting in production on http://0.0.0.0:12335
←[36m2014-01-24T05:27:17.022181+00:00 app[web.1]:←[0m => Run `rails server -h` f
or more startup options
←[36m2014-01-24T05:27:17.022181+00:00 app[web.1]:←[0m Started GET "/" for 108.22
7.81.48 at 2014-01-24 05:27:17 +0000
←[36m2014-01-24T05:27:17.022181+00:00 app[web.1]:←[0m => Booting WEBrick
←[36m2014-01-24T05:27:17.022181+00:00 app[web.1]:←[0m => Ctrl-C to shutdown serv
er
←[36m2014-01-24T05:27:17.140538+00:00 app[web.1]:←[0m Processing by PinsControll
er#index as HTML
←[36m2014-01-24T05:27:17.140538+00:00 app[web.1]:←[0m Processing by PinsControll
er#index as HTML
←[33m2014-01-24T05:27:17.243058+00:00 heroku[router]:←[0m at=info method=GET pat
h=/ host=omr-pinterestingx.herokuapp.com request_id=95dd9900-74ee-4861-8e51-3ec3
eedc9753 fwd="108.227.81.48" dyno=web.1 connect=0ms service=259ms status=304 byt
es=0
←[36m2014-01-24T05:27:17.232081+00:00 app[web.1]:←[0m Rendered pins/index.html
.erb within layouts/application (64.3ms)
←[36m2014-01-24T05:27:17.232081+00:00 app[web.1]:←[0m Rendered pins/index.html
.erb within layouts/application (64.3ms)
←[36m2014-01-24T05:27:17.235160+00:00 app[web.1]:←[0m Rendered layouts/_header
.html.erb (1.1ms)
←[36m2014-01-24T05:27:17.235552+00:00 app[web.1]:←[0m Completed 200 OK in 95ms (
Views: 47.3ms | ActiveRecord: 22.5ms)
←[36m2014-01-24T05:27:17.235160+00:00 app[web.1]:←[0m Rendered layouts/_header
.html.erb (1.1ms)
←[36m2014-01-24T05:27:17.235552+00:00 app[web.1]:←[0m Completed 200 OK in 95ms (
Views: 47.3ms | ActiveRecord: 22.5ms)
←[33m2014-01-24T05:27:17.501260+00:00 heroku[router]:←[0m at=info method=GET pat
h=/assets/application-181cdfad867b7ff79ab77b7ed8cc2b59.css host=omr-pinteresting
x.herokuapp.com request_id=5d154d11-1ea3-4b32-b124-2e3fcf22144a fwd="108.227.81.
48" dyno=web.1 connect=0ms service=6ms status=200 bytes=99534
←[33m2014-01-24T05:27:17.519230+00:00 heroku[router]:←[0m at=info method=GET pat
h=/assets/application-3e804bc17a248fb868fa056958a4fd83.js host=omr-pinterestingx
.herokuapp.com request_id=7cd7bcde-3dc3-4b8a-88ca-8f3c8e74e4ee fwd="108.227.81.4
8" dyno=web.1 connect=0ms service=7ms status=200 bytes=141097
←[32m2014-01-24T05:27:27.489739+00:00 heroku[api]:←[0m Starting process with com
mand `bundle exec rake db:migrate` by norisjavier#gmail.com
←[35m2014-01-24T05:27:30.799091+00:00 heroku[run.7322]:←[0m Awaiting client
←[35m2014-01-24T05:27:30.829842+00:00 heroku[run.7322]:←[0m Starting process wit
h command `bundle exec rake db:migrate`
←[35m2014-01-24T05:27:31.022053+00:00 heroku[run.7322]:←[0m State changed from s
tarting to up
←[35m2014-01-24T05:27:35.520815+00:00 heroku[run.7322]:←[0m Process exited with
status 0
←[35m2014-01-24T05:27:35.534073+00:00 heroku[run.7322]:←[0m State changed from u
p to complete
←[36m2014-01-24T05:27:50.038920+00:00 app[web.1]:←[0m Rendered pins/index.html
.erb within layouts/application (6.9ms)
←[36m2014-01-24T05:27:50.030117+00:00 app[web.1]:←[0m Processing by PinsControll
er#index as HTML
←[36m2014-01-24T05:27:50.027937+00:00 app[web.1]:←[0m Started GET "/" for 108.22
7.81.48 at 2014-01-24 05:27:50 +0000
←[36m2014-01-24T05:27:50.030117+00:00 app[web.1]:←[0m Processing by PinsControll
er#index as HTML
←[36m2014-01-24T05:27:50.038920+00:00 app[web.1]:←[0m Rendered pins/index.html
.erb within layouts/application (6.9ms)
←[36m2014-01-24T05:27:50.040698+00:00 app[web.1]:←[0m Completed 200 OK in 10ms (
Views: 4.2ms | ActiveRecord: 5.0ms)
←[36m2014-01-24T05:27:50.040698+00:00 app[web.1]:←[0m Completed 200 OK in 10ms (
Views: 4.2ms | ActiveRecord: 5.0ms)
←[36m2014-01-24T05:27:50.040257+00:00 app[web.1]:←[0m Rendered layouts/_header
.html.erb (0.7ms)
←[36m2014-01-24T05:27:50.040257+00:00 app[web.1]:←[0m Rendered layouts/_header
.html.erb (0.7ms)
←[36m2014-01-24T05:27:50.027937+00:00 app[web.1]:←[0m Started GET "/" for 108.22
7.81.48 at 2014-01-24 05:27:50 +0000
←[33m2014-01-24T05:27:50.043730+00:00 heroku[router]:←[0m at=info method=GET pat
h=/ host=omr-pinterestingx.herokuapp.com request_id=114be963-6367-4dc4-ae80-fd2b
0c4404c4 fwd="108.227.81.48" dyno=web.1 connect=1ms service=19ms status=304 byte
s=0
←[33m2014-01-24T05:27:50.251339+00:00 heroku[router]:←[0m at=info method=GET pat
h=/assets/application-181cdfad867b7ff79ab77b7ed8cc2b59.css host=omr-pinteresting
x.herokuapp.com request_id=bc73f88b-d742-4ecd-8c46-6d28593cf00f fwd="108.227.81.
48" dyno=web.1 connect=0ms service=6ms status=304 bytes=0
←[33m2014-01-24T05:27:50.265148+00:00 heroku[router]:←[0m at=info method=GET pat
h=/assets/application-3e804bc17a248fb868fa056958a4fd83.js host=omr-pinterestingx
.herokuapp.com request_id=7c09708a-ab5e-40f1-a578-8cbd8a50d238 fwd="108.227.81.4
8" dyno=web.1 connect=0ms service=3ms status=304 bytes=0
←[36m2014-01-24T05:39:15.281248+00:00 app[web.1]:←[0m Started GET "/" for 108.22
7.81.48 at 2014-01-24 05:39:15 +0000
←[36m2014-01-24T05:39:15.281248+00:00 app[web.1]:←[0m Started GET "/" for 108.22
7.81.48 at 2014-01-24 05:39:15 +0000
←[36m2014-01-24T05:39:15.282548+00:00 app[web.1]:←[0m Processing by PinsControll
er#index as HTML
←[36m2014-01-24T05:39:15.282548+00:00 app[web.1]:←[0m Processing by PinsControll
er#index as HTML
←[36m2014-01-24T05:39:15.290690+00:00 app[web.1]:←[0m Rendered pins/index.html
.erb within layouts/application (6.7ms)
←[36m2014-01-24T05:39:15.292301+00:00 app[web.1]:←[0m Rendered layouts/_header
.html.erb (0.7ms)
←[36m2014-01-24T05:39:15.290690+00:00 app[web.1]:←[0m Rendered pins/index.html
.erb within layouts/application (6.7ms)
←[36m2014-01-24T05:39:15.292374+00:00 app[web.1]:←[0m Rendered layouts/_header
.html.erb (0.7ms)
←[36m2014-01-24T05:39:15.292828+00:00 app[web.1]:←[0m Completed 200 OK in 10ms (
Views: 4.2ms | ActiveRecord: 5.0ms)
←[36m2014-01-24T05:39:15.292930+00:00 app[web.1]:←[0m Completed 200 OK in 10ms (
Views: 4.2ms | ActiveRecord: 5.0ms)
←[33m2014-01-24T05:39:15.297080+00:00 heroku[router]:←[0m at=info method=GET pat
h=/ host=omr-pinterestingx.herokuapp.com request_id=e5e731a4-2e38-4dc3-9bd4-f16d
d70b6d6f fwd="108.227.81.48" dyno=web.1 connect=1ms service=18ms status=304 byte
s=0
←[33m2014-01-24T05:39:15.726275+00:00 heroku[router]:←[0m at=info method=GET pat
h=/assets/application-181cdfad867b7ff79ab77b7ed8cc2b59.css host=omr-pinteresting
x.herokuapp.com request_id=dbadec13-1ea9-419d-84d0-018366c1d2df fwd="108.227.81.
48" dyno=web.1 connect=2ms service=13ms status=200 bytes=99534
←[33m2014-01-24T05:39:15.736938+00:00 heroku[router]:←[0m at=info method=GET pat
h=/assets/application-3e804bc17a248fb868fa056958a4fd83.js host=omr-pinterestingx
.herokuapp.com request_id=be9f3e8f-22cd-46f8-a38e-70499e520bbb fwd="108.227.81.4
8" dyno=web.1 connect=1ms service=6ms status=304 bytes=0
←[36m2014-01-24T05:39:20.124660+00:00 app[web.1]:←[0m Started DELETE "/users/sig
n_out" for 108.227.81.48 at 2014-01-24 05:39:20 +0000
←[36m2014-01-24T05:39:20.124660+00:00 app[web.1]:←[0m Started DELETE "/users/sig
n_out" for 108.227.81.48 at 2014-01-24 05:39:20 +0000
←[36m2014-01-24T05:39:20.126980+00:00 app[web.1]:←[0m Processing by Devise::Sess
ionsController#destroy as HTML
←[36m2014-01-24T05:39:20.126980+00:00 app[web.1]:←[0m Parameters: {"authentici
ty_token"=>"1AVdG1oEBZrR2kBVmArxtsQfDriMwhdxepobzVeZjUo="}
←[36m2014-01-24T05:39:20.127074+00:00 app[web.1]:←[0m Parameters: {"authentici
ty_token"=>"1AVdG1oEBZrR2kBVmArxtsQfDriMwhdxepobzVeZjUo="}
←[36m2014-01-24T05:39:20.126980+00:00 app[web.1]:←[0m Processing by Devise::Sess
ionsController#destroy as HTML
←[33m2014-01-24T05:39:20.202045+00:00 heroku[router]:←[0m at=info method=POST pa
th=/users/sign_out host=omr-pinterestingx.herokuapp.com request_id=a0332921-4adc
-4f55-ac16-1d76b01116b8 fwd="108.227.81.48" dyno=web.1 connect=2ms service=86ms
status=302 bytes=105
←[36m2014-01-24T05:39:20.196532+00:00 app[web.1]:←[0m Redirected to http://omr-p
interestingx.herokuapp.com/
←[36m2014-01-24T05:39:20.196789+00:00 app[web.1]:←[0m Completed 302 Found in 70m
s (ActiveRecord: 6.1ms)
←[36m2014-01-24T05:39:20.196532+00:00 app[web.1]:←[0m Redirected to http://omr-p
interestingx.herokuapp.com/
←[36m2014-01-24T05:39:20.188336+00:00 app[web.1]:←[0m [deprecated] I18n.enforce_
available_locales will default to true in the future. If you really want to skip
validation of your locale you can set I18n.enforce_available_locales = false to
avoid this message.
←[36m2014-01-24T05:39:20.196735+00:00 app[web.1]:←[0m Completed 302 Found in 70m
s (ActiveRecord: 6.1ms)
←[36m2014-01-24T05:39:20.570672+00:00 app[web.1]:←[0m Rendered pages/_home.htm
l.erb (1.0ms)
←[36m2014-01-24T05:39:20.555106+00:00 app[web.1]:←[0m Started GET "/" for 108.22
7.81.48 at 2014-01-24 05:39:20 +0000
←[36m2014-01-24T05:39:20.555106+00:00 app[web.1]:←[0m Started GET "/" for 108.22
7.81.48 at 2014-01-24 05:39:20 +0000
←[36m2014-01-24T05:39:20.556383+00:00 app[web.1]:←[0m Processing by PinsControll
er#index as HTML
←[36m2014-01-24T05:39:20.573939+00:00 app[web.1]:←[0m Rendered pins/index.html
.erb within layouts/application (16.1ms)
←[36m2014-01-24T05:39:20.556383+00:00 app[web.1]:←[0m Processing by PinsControll
er#index as HTML
←[36m2014-01-24T05:39:20.573939+00:00 app[web.1]:←[0m Rendered pins/index.html
.erb within layouts/application (16.1ms)
←[36m2014-01-24T05:39:20.575704+00:00 app[web.1]:←[0m Rendered layouts/_header
.html.erb (1.0ms)
←[36m2014-01-24T05:39:20.575704+00:00 app[web.1]:←[0m Rendered layouts/_header
.html.erb (1.0ms)
←[36m2014-01-24T05:39:20.570672+00:00 app[web.1]:←[0m Rendered pages/_home.htm
l.erb (1.0ms)
←[36m2014-01-24T05:39:20.576180+00:00 app[web.1]:←[0m Completed 200 OK in 20ms (
Views: 16.1ms | ActiveRecord: 2.5ms)
←[36m2014-01-24T05:39:20.576180+00:00 app[web.1]:←[0m Completed 200 OK in 20ms (
Views: 16.1ms | ActiveRecord: 2.5ms)
←[33m2014-01-24T05:39:20.578835+00:00 heroku[router]:←[0m at=info method=GET pat
h=/ host=omr-pinterestingx.herokuapp.com request_id=105ba383-0040-4647-b888-7790
9123694f fwd="108.227.81.48" dyno=web.1 connect=10ms service=30ms status=200 byt
es=1928
←[36m2014-01-24T05:42:07.219371+00:00 app[web.1]:←[0m Rendered pins/index.html
.erb within layouts/application (6.6ms)
←[36m2014-01-24T05:42:07.219371+00:00 app[web.1]:←[0m Rendered pins/index.html
.erb within layouts/application (6.6ms)
←[36m2014-01-24T05:42:07.221931+00:00 app[web.1]:←[0m Completed 200 OK in 16ms (
Views: 10.7ms | ActiveRecord: 2.6ms)
←[36m2014-01-24T05:42:07.221931+00:00 app[web.1]:←[0m Completed 200 OK in 16ms (
Views: 10.7ms | ActiveRecord: 2.6ms)
←[36m2014-01-24T05:42:07.203780+00:00 app[web.1]:←[0m Started GET "/" for 108.22
7.81.48 at 2014-01-24 05:42:07 +0000
←[36m2014-01-24T05:42:07.203560+00:00 app[web.1]:←[0m Started GET "/" for 108.22
7.81.48 at 2014-01-24 05:42:07 +0000
←[36m2014-01-24T05:42:07.205899+00:00 app[web.1]:←[0m Processing by PinsControll
er#index as HTML
←[36m2014-01-24T05:42:07.215560+00:00 app[web.1]:←[0m Rendered pages/_home.htm
l.erb (1.0ms)
←[36m2014-01-24T05:42:07.205687+00:00 app[web.1]:←[0m Processing by PinsControll
er#index as HTML
←[36m2014-01-24T05:42:07.215560+00:00 app[web.1]:←[0m Rendered pages/_home.htm
l.erb (1.0ms)
←[36m2014-01-24T05:42:07.221542+00:00 app[web.1]:←[0m Rendered layouts/_header
.html.erb (1.5ms)
←[36m2014-01-24T05:42:07.221542+00:00 app[web.1]:←[0m Rendered layouts/_header
.html.erb (1.5ms)
←[33m2014-01-24T05:42:07.455010+00:00 heroku[router]:←[0m at=info method=GET pat
h=/assets/application-181cdfad867b7ff79ab77b7ed8cc2b59.css host=omr-pinteresting
x.herokuapp.com request_id=71800b84-1658-4f60-a257-fa56f4ade2ba fwd="108.227.81.
48" dyno=web.1 connect=1ms service=6ms status=304 bytes=0
←[33m2014-01-24T05:42:07.466827+00:00 heroku[router]:←[0m at=info method=GET pat
h=/assets/application-3e804bc17a248fb868fa056958a4fd83.js host=omr-pinterestingx
.herokuapp.com request_id=560eea6e-650c-4b47-ad6b-1eee25c6cc9c fwd="108.227.81.4
8" dyno=web.1 connect=2ms service=4ms status=304 bytes=0
←[33m2014-01-24T05:42:07.227755+00:00 heroku[router]:←[0m at=info method=GET pat
h=/ host=omr-pinterestingx.herokuapp.com request_id=31a5b45f-ff03-4d6d-be30-7c45
280a0b43 fwd="108.227.81.48" dyno=web.1 connect=2ms service=34ms status=200 byte
s=1864
I have just deployed my app on Heroku. I have access to home however when I create an account I have the error "we're sorry but something were wrong". In the heroku console there are the following lines :
2013-07-25T14:43:57.205734+00:00 app[web.1]:
2013-07-25T14:43:57.326077+00:00 app[web.1]:
2013-07-25T14:43:57.326077+00:00 app[web.1]: app/controllers/users_controller.rb:36:in `create'
2013-07-25T14:43:57.326077+00:00 app[web.1]: Errno::ECONNREFUSED (Connection refused - {:data=>"<?xml version=\"1.0\" encoding=\"UTF-8\"?><add><doc><field name=\"id\">User 23</field><field name=\"type\">User</field><field name=\"type\">ActiveRecord::Base</field><field name=\"class_name\">User</field><field name=\"nom_text\">julien</field><field name=\"email_text\">julien#resenders.com</field></doc></add>", :headers=>{"Content-Type"=>"text/xml"}, :method=>:post, :params=>{:wt=>:ruby}, :query=>"wt=ruby", :path=>"update", :uri=>#<URI::HTTP:0x007f987b4c48a0 URL:http://localhost:8080/solr/update?wt=ruby>, :open_timeout=>nil, :read_timeout=>nil, :retry_503=>nil, :retry_after_limit=>nil}):
2013-07-25T14:43:57.337273+00:00 app[web.1]: Processing by UsersController#create as HTML
2013-07-25T14:43:57.326077+00:00 app[web.1]:
2013-07-25T14:43:57.326077+00:00 app[web.1]:
2013-07-25T14:43:57.337273+00:00 app[web.1]: Completed 500 Internal Server Error in 850ms
2013-07-25T14:43:57.337273+00:00 app[web.1]: Parameters: {"utf8"=>"???", "authenticity_token"=>"gdLt0F1TJi+GaFCe8sFFKRikXgAEEnW6DmIyPbLeCa4=", "user"=>{"nom"=>"julien", "email"=>"julien#resenders.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "resender"=>"0", "gang_id"=>"1", "addresses_attributes"=>{"0"=>{"first_name"=>"L", "last_name"=>"L"}}}, "commit"=>"Inscription"}
2013-07-25T14:43:57.337273+00:00 app[web.1]: Rendered devise/mailer/confirmation_instructions.html.erb (1.3ms)
2013-07-25T14:43:57.344954+00:00 heroku[router]: at=info method=POST path=/users host=www.resenders.com fwd="37.58.138.20" dyno=web.1 connect=4ms service=930ms status=500 bytes=643
I figured out the problem in local with "rake sunspot:solr:run" but even if "heroku run rake sunspot:solr:run" seems to work, it does not sort out this trouble on Heroku. How can I do ? Maybe with Websolr ? Thank you in advance guys !
4 Suggestions:
Be sure that your server is running
Be sure that your routes are set correctly
Add the websolr add on to your heroku stack --> https://devcenter.heroku.com/articles/websolr
Be sure to always remove personal data when pasting code to the internet
I have a Rails app and I just installed gem 'mobiscroll-rails'.
I got it working in development on my iMac. But, when I run it on Heroku, I get:
ActionController::RoutingError (No route matches [GET] "/apple-touch-icon-precomposed.png"):
app[web.1]: cache: [GET /apple-touch-icon-precomposed.png] miss
heroku[router]: at=info method=GET path=/apple-touch-icon-precomposed.png host=www.requestsys.com fwd=70.34.1.156 dyno=web.1 queue=0 wait=0ms connect=5ms service=8ms status=404 bytes=728
heroku[nginx]: 70.34.1.156 - - [20/Jan/2013:23:58:46 +0000] "GET /apple-touch-icon-precomposed.png HTTP/1.1" 404 728 "-" "MobileSafari/8536.25 CFNetwork/609 Darwin/13.0.0" www.requestsys.com
app[web.1]: Started GET "/apple-touch-icon.png" for 70.34.1.156 at 2013-01-20 16:58:47 -0700
ActionController::RoutingError (No route matches [GET] "/apple-touch-icon.png"):
cache: [GET /apple-touch-icon.png] miss
"GET /apple-touch-icon.png HTTP/1.1" 404 728 "-" "MobileSafari/8536.25 CFNetwork/609 Darwin/13.0.0" www.requestsys.com
at=info method=GET path=/apple-touch-icon.png host=www.requestsys.com fwd=70.34.1.156 dyno=web.1 queue=0 wait=0ms connect=3ms service=7ms status=404 bytes=728
My application.html.erb has:
<!-- Le fav and touch icons -->
<link href="images/favicon.ico" rel="shortcut icon">
<link href="images/apple-touch-icon.png" rel="apple-touch-icon">
<link href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon" sizes="72x72">
<link href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon" sizes="114x114">
Thanks!
UPDATE -- now I'm getting this:
ActionView::Template::Error (Invalid CSS after ".ios td:": expected pseudoclass or pseudoelement, was " first-child .d..."
(in /app/app/assets/stylesheets/application.css)):
17: }
18:
19:
20: <%= stylesheet_link_tag "application", :media => "all" %>
app/views/layouts/application.html.erb:20:in `_app_views_layouts_application_html_erb__4520300412125467599_68152740'
Looks like some invalid CSS somewhere in the mobiscroll-rails gem. I got it locally when I bundled:
gem 'mobiscroll-rails'
and did rake assets:precompile, which is what's happening on Heroku during asset compilation. I loaded the version from the git repo and was able to precompile just fine:
gem 'mobiscroll-rails', :git => 'https://github.com/crushlovely/mobiscroll-rails.git'
EDIT: Alternatively, you can try this gem that just came out a couple of days ago:
https://github.com/Dinuz/mobiscroll-rails.git