Devise Sign Up Freeze - ruby-on-rails

I am getting a strange error with Devise on my Ruby on Rails app. When proceeding to the default Sign-Up form, after entering the email, and password field and then pressing sign-up, the button becomes unclickable
and then nothing happens.
Previous Users have been successfully registered via this method, so I can confirm it did work previously. I have since not registered any new users in many months.
Heroku logs don't show any activity except for getting the sign-up page.
2016-10-12T13:34:23.799746+00:00 app[web.1]: Started GET
"/users/sign_up" for 101.164.74.67 at 2016-10-13 00:34:23 +1100
2016-10-12T13:34:23.801698+00:00 app[web.1]: Processing by
Users::RegistrationsController#new as HTML
2016-10-12T13:34:23.806692+00:00 app[web.1]: Rendered
devise/_basic_form.html.erb (2.8ms) 2016-10-12T13:34:23.807344+00:00
app[web.1]: Rendered devise/shared/_links.html.erb (0.5ms)
2016-10-12T13:34:23.807443+00:00 app[web.1]: Rendered
devise/registrations/new.html.erb within layouts/application (3.8ms)
2016-10-12T13:34:23.810189+00:00 app[web.1]: Completed 200 OK in 8ms
(Views: 7.0ms | ActiveRecord: 0.0ms) 2016-10-12T13:34:24.055291+00:00
heroku[router]: at=info method=GET
path="/assets/application-fca53857b919fcfd74765023315d07a5dcd04e0903cc840513af7edff1a08efd.css" host=www.puntsquad.com request_id=aa91286f-b
fd8-4650-bc12-d6d9e51da3a9 fwd="101.164.74.67" dyno=web.1 connect=1ms
service=3ms status=304 bytes=133
2016-10-12T13:34:24.074652+00:00 heroku[router]: at=info method=GET
path="/assets/chartkick-f077bcf66f815b88f8d0c98ee47a985e34e82baad8e59cd59bf539b48610e20d.js"
host=www.puntsquad.com request_id=99ee8e9f-c1e6
-446b-97d9-890d25675a3f fwd="101.164.74.67" dyno=web.1 connect=1ms service=4ms status=304 bytes=133 2016-10-12T13:34:24.062979+00:00
heroku[router]: at=info method=GET
path="/assets/application-8ca7fdc6c863cd6724872dba3750dc3ad3fc9a9ea1921a4fac1e31356e0df7ba.js"
host=www.puntsquad.com request_id=89d93555-31
c4-4276-9697-62a802a8faf5 fwd="101.164.74.67" dyno=web.1 connect=1ms
service=3ms status=304 bytes=133 2016-10-12T13:34:24.310851+00:00
heroku[router]: at=info method=GET
path="/assets/logo-dark-text-25488e5bdfd754d5a6323b07d20d3ad45a14d4914d89fb6b079fd26a90def0a9.png" host=www.puntsquad.com request_id=21a3ebe
e-c828-4469-b64c-c1e78dcefeb9 fwd="101.164.74.67" dyno=web.1
connect=2ms service=5ms status=304 bytes=133
2016-10-12T13:34:24.333208+00:00 heroku[router]: at=info method=GET
path="/assets/logo-842bcfb411552d5c9608dd20e5f3824023295525e43950d93b720fbf047eed82.png" host=www.puntsquad.com request_id=81224e9e-ac3b-466
7-a580-01991908c44b fwd="101.164.74.67" dyno=web.1 connect=1ms
service=3ms status=304 bytes=133 2016-10-12T13:34:24.343606+00:00
heroku[router]: at=info method=GET
path="/assets/fontawesome-webfont-ff82aeed6b9bb6701696c84d1b223d2e682eb78c89117a438ce6cfea8c498995.woff2?v=4.5.0"
host=www.puntsquad.com req
uest_id=8bf04f8a-9f14-4b90-a50a-ffe50666a70d fwd="101.164.74.67"
dyno=web.1 connect=2ms service=3ms status=304 bytes=133
2016-10-12T13:34:24.755694+00:00 heroku[router]: at=info method=GET
path="/assets/fontawesome-webfont-c812ddc9e475d3e65d68a6b3b589ce598a2a5babb7afc55477d59215c4a38a40.woff?v=4.5.0"
host=www.puntsquad.com requ
est_id=ac598fcc-b038-45ca-a78c-6557dc96a897 fwd="101.164.74.67"
dyno=web.1 connect=1ms service=9ms status=304 bytes=133
2016-10-12T13:34:24.995528+00:00 heroku[router]: at=info method=GET
path="/assets/fontawesome-webfont-7b5a4320fba0d4c8f79327645b4b9cc875a2ec617a557e849b813918eb733499.ttf?v=4.5.0"
host=www.puntsquad.com reque
st_id=6d8e4172-8b95-4615-8479-0e9bd83cef17 fwd="101.164.74.67"
dyno=web.1 connect=1ms service=6ms status=304 bytes=133
2016-10-12T13:34:25.261030+00:00 heroku[router]: at=info method=GET
path="/favicon.ico" host=www.puntsquad.com
request_id=c2e6c575-4e49-4b09-91eb-001ea0d21bbb fwd="101.164.74.67"
dyno=web.1 connect=1ms servic e=9ms status=200 bytes=228

Reason for this is because you're Strip publishable key is invalid.
You need to obtain or re-add a valid key.
See the Stripe documentation here for Setting your publishable key.
I debugged this by visiting his site, trying to register and observing the Stripe error on the browser console.

Related

Heroku - We're sorry, but something went wrong - Issue occurring only on Heroku not locally

Sorry to bother but I really don't know what else to try. I have pushed my rails application to heroku and during the last push everything went well except that one of the pages (projects#index) returns this error in Heroku:
We're sorry, but something went wrong.
If you are the application owner check the logs for more information.
The same doesn't occur in Cloud 9 when I run the server locally. The same page shows without issues.
Looking at previous answers, I've tried running:
heroku run rake db:migrate
I also tried re-pushing everything by running the following commands:
git push heroku
heroku pg:reset DATABASE
heroku run rails db:migrate
heroku run rails db:seed
heroku restart
Here are my heroku logs:
2016-11-09T18:48:22.095610+00:00 app[web.1]: * Min threads: 0, max threads: 16
2016-11-09T18:48:22.095627+00:00 app[web.1]: * Environment: production
2016-11-09T18:48:22.096004+00:00 app[web.1]: Use Ctrl-C to stop
2016-11-09T18:48:22.095780+00:00 app[web.1]: * Listening on tcp://0.0.0.0:3666
2016-11-09T18:48:22.259703+00:00 heroku[web.1]: State changed from starting to up
2016-11-09T18:48:24.502298+00:00 heroku[router]: at=info method=GET path="/projects" host=stark-falls-63733.herokuapp.com request_id=2c6f6731-bedc-4367-83f9-f40a87273fe5 fwd="86.44.57.230" dyno=web.1 connect=0ms service=1402ms status=500 bytes=1669
2016-11-09T18:48:24.790630+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=stark-falls-63733.herokuapp.com request_id=4dae94ac-b865-4514-b59b-074591a69d05 fwd="86.44.57.230" dyno=web.1 connect=0ms service=2ms status=200 bytes=143
2016-11-09T18:49:18.903562+00:00 heroku[api]: Starting process with command `rails db:migrate` by alessia.bass#yahoo.ie
2016-11-09T18:49:23.120484+00:00 heroku[run.7366]: Awaiting client
2016-11-09T18:49:23.143476+00:00 heroku[run.7366]: Starting process with command `rails db:migrate`
2016-11-09T18:49:23.302666+00:00 heroku[run.7366]: State changed from starting to up
2016-11-09T18:49:28.044047+00:00 heroku[run.7366]: State changed from up to complete
2016-11-09T18:49:28.029405+00:00 heroku[run.7366]: Process exited with status 0
2016-11-09T18:49:39.596513+00:00 heroku[api]: Starting process with command `rails db:seed` by alessia.bass#yahoo.ie
2016-11-09T18:49:44.198548+00:00 heroku[run.3484]: Awaiting client
2016-11-09T18:49:44.246315+00:00 heroku[run.3484]: Starting process with command `rails db:seed`
2016-11-09T18:49:44.304728+00:00 heroku[run.3484]: State changed from starting to up
2016-11-09T18:49:50.403853+00:00 heroku[run.3484]: State changed from up to complete
2016-11-09T18:49:50.393367+00:00 heroku[run.3484]: Process exited with status 0
2016-11-09T18:50:11.659495+00:00 heroku[router]: at=info method=GET path="/projects" host=stark-falls-63733.herokuapp.com request_id=73beb6fe-90c6-41c9-8f75-e8939fd7a4be fwd="86.44.57.230" dyno=web.1 connect=0ms service=109ms status=500 bytes=1669
2016-11-09T18:50:11.861324+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=stark-falls-63733.herokuapp.com request_id=694b31e7-b3df-4c00-85fa-d931d6f3ba11 fwd="86.44.57.230" dyno=web.1 connect=0ms service=3ms status=200 bytes=143
2016-11-09T18:50:13.257178+00:00 heroku[router]: at=info method=GET path="/projects" host=stark-falls-63733.herokuapp.com request_id=0c7878ec-0017-48a2-a53d-55126ca12a97 fwd="86.44.57.230" dyno=web.1 connect=0ms service=28ms status=500 bytes=1669
2016-11-09T18:50:13.422750+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=stark-falls-63733.herokuapp.com request_id=8c44d51f-ca89-487b-ae25-eb06ef04735e fwd="86.44.57.230" dyno=web.1 connect=0ms service=4ms status=200 bytes=143
2016-11-09T18:50:25.482365+00:00 heroku[web.1]: Restarting
2016-11-09T18:50:25.483959+00:00 heroku[web.1]: State changed from up to starting
2016-11-09T18:50:28.492311+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-11-09T18:50:29.151373+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2016-11-09T18:50:29.151850+00:00 app[web.1]: === puma shutdown: 2016-11-09 18:50:29 +0000 ===
2016-11-09T18:50:29.151889+00:00 app[web.1]: - Goodbye!
2016-11-09T18:50:29.152378+00:00 app[web.1]: Exiting
2016-11-09T18:50:29.358836+00:00 heroku[web.1]: Process exited with status 0
2016-11-09T18:50:29.841404+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 22013 -e production`
2016-11-09T18:50:35.820996+00:00 app[web.1]: => Booting Puma
2016-11-09T18:50:35.821017+00:00 app[web.1]: => Rails 5.0.0.1 application starting in production on http://0.0.0.0:22013
2016-11-09T18:50:35.821018+00:00 app[web.1]: => Run `rails server -h` for more startup options
2016-11-09T18:50:37.033565+00:00 app[web.1]: Puma starting in single mode...
2016-11-09T18:50:37.033582+00:00 app[web.1]: * Version 3.4.0 (ruby 2.2.4-p230), codename: Owl Bowl Brawl
2016-11-09T18:50:37.033585+00:00 app[web.1]: * Min threads: 0, max threads: 16
2016-11-09T18:50:37.033617+00:00 app[web.1]: * Environment: production
2016-11-09T18:50:37.033865+00:00 app[web.1]: * Listening on tcp://0.0.0.0:22013
2016-11-09T18:50:37.034023+00:00 app[web.1]: Use Ctrl-C to stop
2016-11-09T18:50:37.177370+00:00 heroku[web.1]: State changed from starting to up
2016-11-09T18:50:37.930818+00:00 heroku[router]: at=info method=GET path="/projects" host=stark-falls-63733.herokuapp.com request_id=01420f22-76e1-4916-be34-e96e5db985df fwd="86.44.57.230" dyno=web.1 connect=0ms service=424ms status=500 bytes=1669
2016-11-09T18:50:38.121454+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=stark-falls-63733.herokuapp.com request_id=89d07228-0172-4809-8a43-241662cdfdcb fwd="86.44.57.230" dyno=web.1 connect=0ms service=4ms status=200 bytes=143
2016-11-09T18:52:12.082290+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by alessia.bass#yahoo.ie
2016-11-09T18:52:18.172017+00:00 heroku[run.6086]: State changed from starting to up
2016-11-09T18:52:18.336471+00:00 heroku[run.6086]: Awaiting client
2016-11-09T18:52:18.372809+00:00 heroku[run.6086]: Starting process with command `bundle exec rake db:migrate`
2016-11-09T18:52:23.522954+00:00 heroku[run.6086]: State changed from up to complete
2016-11-09T18:52:23.513862+00:00 heroku[run.6086]: Process exited with status 0
2016-11-09T18:52:30.397822+00:00 heroku[router]: at=info method=GET path="/projects" host=stark-falls-63733.herokuapp.com request_id=8a1dc1d5-1f5b-425b-8deb-c0d60dbe15bb fwd="86.44.57.230" dyno=web.1 connect=0ms service=61ms status=500 bytes=1669
2016-11-09T18:52:30.602701+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=stark-falls-63733.herokuapp.com request_id=6105f2be-9c60-4d35-8ff2-cc4fcf7b438f fwd="86.44.57.230" dyno=web.1 connect=1ms service=1ms status=200 bytes=143
2016-11-09T18:52:32.824633+00:00 heroku[router]: at=info method=GET path="/projects" host=stark-falls-63733.herokuapp.com request_id=074d3fc0-9ad1-4c50-9325-139d392b502b fwd="86.44.57.230" dyno=web.1 connect=0ms service=40ms status=500 bytes=1669
2016-11-09T18:52:32.985752+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=stark-falls-63733.herokuapp.com request_id=f13fa5bf-5f2f-48f7-92eb-ff09beb5919d fwd="86.44.57.230" dyno=web.1 connect=0ms service=8ms status=200 bytes=143
2016-11-09T18:52:37.881288+00:00 heroku[router]: at=info method=GET path="/users" host=stark-falls-63733.herokuapp.com request_id=e3d2067c-b093-41e0-9d6f-72a68f172edf fwd="86.44.57.230" dyno=web.1 connect=0ms service=50ms status=200 bytes=3208
2016-11-09T18:52:42.036223+00:00 heroku[router]: at=info method=GET path="/projects" host=stark-falls-63733.herokuapp.com request_id=df869638-2c3a-40ac-b0a7-ba4a3190cdd6 fwd="86.44.57.230" dyno=web.1 connect=0ms service=17ms status=500 bytes=1669
2016-11-09T18:53:01.489311+00:00 heroku[router]: at=info method=GET path="/projects" host=stark-falls-63733.herokuapp.com request_id=dd949ce7-bfb1-422b-81fd-8ebc02540e71 fwd="86.44.57.230" dyno=web.1 connect=1ms service=71ms status=500 bytes=1669
2016-11-09T19:13:01.823684+00:00 heroku[router]: at=info method=GET path="/projects" host=stark-falls-63733.herokuapp.com request_id=62e72010-b749-4a8e-9f5d-3ee2550e4eb5 fwd="86.44.57.230" dyno=web.1 connect=0ms service=21ms status=500 bytes=1669
2016-11-09T19:24:19.274988+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by alessia.bass#yahoo.ie
2016-11-09T19:24:25.388503+00:00 heroku[run.8672]: Awaiting client
2016-11-09T19:24:25.463637+00:00 heroku[run.8672]: Starting process with command `bundle exec rake db:migrate`
2016-11-09T19:24:25.535795+00:00 heroku[run.8672]: State changed from starting to up
2016-11-09T19:24:33.095488+00:00 heroku[run.8672]: Process exited with status 0
2016-11-09T19:24:33.081820+00:00 heroku[run.8672]: State changed from up to complete
2016-11-09T19:25:12.201241+00:00 heroku[router]: at=info method=GET path="/projects" host=stark-falls-63733.herokuapp.com request_id=529aeacd-e9b9-4b96-a2d7-34ddb5d3896e fwd="86.44.57.230" dyno=web.1 connect=0ms service=14ms status=500 bytes=1669
2016-11-09T19:25:12.469696+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=stark-falls-63733.herokuapp.com request_id=99e6fa84-47c2-4ae4-86cc-9f4e9f36ca16 fwd="86.44.57.230" dyno=web.1 connect=0ms service=2ms status=304 bytes=48
2016-11-09T19:28:30.885743+00:00 heroku[api]: Starting process with command `rails consoe` by alessia.bass#yahoo.ie
2016-11-09T19:28:35.368273+00:00 heroku[run.7002]: Awaiting client
2016-11-09T19:28:35.393535+00:00 heroku[run.7002]: Starting process with command `rails consoe`
2016-11-09T19:28:35.539374+00:00 heroku[run.7002]: State changed from starting to up
2016-11-09T19:28:38.853885+00:00 heroku[run.7002]: State changed from up to complete
2016-11-09T19:28:38.878693+00:00 heroku[run.7002]: Process exited with status 1
2016-11-09T19:28:46.270972+00:00 heroku[api]: Starting process with command `rails console` by alessia.bass#yahoo.ie
2016-11-09T19:28:51.734321+00:00 heroku[run.9640]: Awaiting client
2016-11-09T19:28:51.769438+00:00 heroku[run.9640]: Starting process with command `rails console`
2016-11-09T19:28:51.802682+00:00 heroku[run.9640]: State changed from starting to up
2016-11-09T19:29:03.378053+00:00 heroku[run.9640]: Process exited with status 0
2016-11-09T19:29:03.393812+00:00 heroku[run.9640]: State changed from up to complete
2016-11-09T19:29:16.843286+00:00 heroku[web.1]: Restarting
2016-11-09T19:29:16.843982+00:00 heroku[web.1]: State changed from up to starting
2016-11-09T19:29:20.220947+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-11-09T19:29:21.247977+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2016-11-09T19:29:21.248148+00:00 app[web.1]: === puma shutdown: 2016-11-09 19:29:21 +0000 ===
2016-11-09T19:29:21.248152+00:00 app[web.1]: - Goodbye!
2016-11-09T19:29:21.248232+00:00 app[web.1]: Exiting
2016-11-09T19:29:21.388099+00:00 heroku[web.1]: Process exited with status 0
2016-11-09T19:29:21.832713+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 21042 -e production`
2016-11-09T19:29:25.892825+00:00 app[web.1]: => Booting Puma
2016-11-09T19:29:25.892864+00:00 app[web.1]: => Rails 5.0.0.1 application starting in production on http://0.0.0.0:21042
2016-11-09T19:29:25.892865+00:00 app[web.1]: => Run `rails server -h` for more startup options
2016-11-09T19:29:26.922809+00:00 heroku[web.1]: State changed from starting to up
2016-11-09T19:29:26.844730+00:00 app[web.1]: Puma starting in single mode...
2016-11-09T19:29:26.844748+00:00 app[web.1]: * Version 3.4.0 (ruby 2.2.4-p230), codename: Owl Bowl Brawl
2016-11-09T19:29:26.844749+00:00 app[web.1]: * Min threads: 0, max threads: 16
2016-11-09T19:29:26.844750+00:00 app[web.1]: * Environment: production
2016-11-09T19:29:26.844827+00:00 app[web.1]: * Listening on tcp://0.0.0.0:21042
2016-11-09T19:29:26.845007+00:00 app[web.1]: Use Ctrl-C to stop
2016-11-09T19:29:28.618363+00:00 heroku[router]: at=info method=GET path="/projects" host=stark-falls-63733.herokuapp.com request_id=ae553309-c165-4526-b443-fd098df71c47 fwd="86.44.57.230" dyno=web.1 connect=1ms service=139ms status=500 bytes=1669
2016-11-09T19:29:28.754190+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=stark-falls-63733.herokuapp.com request_id=453d6e7f-b4e8-4337-9340-84cb8dcaa95f fwd="86.44.57.230" dyno=web.1 connect=1ms service=3ms status=200 bytes=143
2016-11-09T19:29:28.910252+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=stark-falls-63733.herokuapp.com request_id=79a6c43e-1ef3-4467-a60e-2c83d7ae0e83 fwd="86.44.57.230" dyno=web.1 connect=1ms service=2ms status=200 bytes=143
2016-11-09T19:29:30.017146+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=stark-falls-63733.herokuapp.com request_id=0dcba4a6-2113-437c-acb3-4383f16dd191 fwd="104.131.194.174" dyno=web.1 connect=0ms service=1ms status=200 bytes=143
This is my index view:
<% provide(:title, 'All Projects') %>
<h1>All Projects</h1>
<table>
<tbody>
<tr>
<td>
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button"
data-toggle="dropdown">Filter by Team<span class="caret"></span></button>
<ul class="dropdown-menu">
<% Team.all.each do |team| %>
<li>
<%= link_to team.tName, projects_path(team: team.tName), class: "link" %>
</li>
<li class="<%= 'active' if params[:team] == team.tName %>">
<% end %>
</ul>
</div>
</td>
</tr>
<tr>
<td>
<div>
<button type="button" class="btn btn-default"><%= link_to "Remove Team Filters", projects_path, class: "link" %></button>
</div>
</td>
</tr>
</tbody>
</table>
<ul class="users">
<%= render 'projects/projectindex' %>
</ul>
And the partial rendered is:
<% #projects.each do |project| %>
<h2><%= params[:team] %></h2>
<% if #projects.count == 0 %>
<h2>There are no projects currently in this category</h2>
<% end %>
<li>
Title: <%= project.title %><br>
Team: <%= project.team.tName%><br>
Description: <%= project.description %><br>
Status:<%= project.status %><br>
Type: <%= project.p_type %><br>
Updated: <%= time_ago_in_words(project.updated_at) %> ago.
</li>
<% end %>
Any idea how I can fix the issue?
Thank you in advance for your time.
So... as everything was working locally I continued with my work by adding a new model, similar to the project one that I had already created. I pushed everything to heroku and following the same steps as before:
git push heroku
heroku pg:reset DATABASE
heroku run rails db:migrate
heroku run rails db:seed
heroku restart
When I went into the heroku site, the error on the project index page was no longer occurring. I didn't touch anything on any of the project pages as the new model is independent from the project one... I really don't know why!
Thanks to #Lucas Costa for trying to help and for anybody that has taken the time to read my question.

rails4.2 heroku cloudfront serving static assets

I have a rails4 app deployed on heroku and using cloudfront as CDN.
Everything works fine in development. In production only the things in the app/assets are served properly, the images in the public folder can't be found.
What should I do to make the public folder assets work? I'd like to serve them from CDN as well if possible, but I'm open to any working solution
Current settings:
production.rb
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? #enabled by heroku default settings
config.assets.compile = false
config.assets.digest = true
config.action_controller.asset_host = 'mycode.cloudfront.net'
config.font_assets.origin = '*'
gemfile
# I'm NOT using asset_sync gem
gem 'font_assets', '~> 0.1.12' #this is needed to make googlefonts work
gem 'rails_12factor', '~> 0.0.3', group :production
UPDATE:
working heroku logs
2016-01-25T19:00:24.624690+00:00 heroku[router]: at=info method=GET path="/500.html" host=appfaskyn.herokuapp.com request_id=d1a637be-b539-429a-9fcd-5f4d0025b562 fwd="50.250.214.91" dyno=web.1 connect=2ms service=5ms status=304 bytes=48
2016-01-25T19:00:24.794605+00:00 heroku[router]: at=info method=GET path="/thirdlogo.png" host=appfaskyn.herokuapp.com request_id=41b8aa45-8e70-43ef-af53-b4e0ad44ec8b fwd="50.250.214.91" dyno=web.1 connect=0ms service=4ms status=304 bytes=48
UPDATE2:
Realized that it works w/ certain routes.
So if I hit app/dsfd then it finds the pic with path="/dsfd"
but if I hit app/users/2 (user does not exist anymore, so should be the same page does not exist error) then path="/users/2" can't find the pic.
log if found:
2016-01-29T18:56:14.377420+00:00 heroku[router]: at=info method=GET path="/dsfd" host=www.faskyn.com request_id=76e1c73d-dd22-446f-89b4-096dcbae6f6c fwd="64.245.0.218" dyno=web.1 connect=0ms service=23ms status=404 bytes=840
2016-01-29T18:56:14.320423+00:00 app[web.1]: source=rack-timeout id=76e1c73d-dd22-446f-89b4-096dcbae6f6c wait=0ms timeout=20000ms state=ready
2016-01-29T18:56:14.320609+00:00 app[web.1]: source=rack-timeout id=76e1c73d-dd22-446f-89b4-096dcbae6f6c wait=0ms timeout=20000ms service=1ms state=active
2016-01-29T18:56:14.324730+00:00 app[web.1]: Started GET "/dsfd" for 64.245.0.218 at 2016-01-29 18:56:14 +0000
2016-01-29T18:56:14.331095+00:00 app[web.1]:
2016-01-29T18:56:14.331099+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/fddf"):
2016-01-29T18:56:14.331100+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispa
logs if not found:
Processing by UsersController#show as PNG
2016-01-29T18:49:20.952915+00:00 app[web.1]: Parameters: {"id"=>"thirdlogo"}
2016-01-29T18:49:20.959096+00:00 app[web.1]: User Load (3.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
2016-01-29T18:49:20.963937+00:00 app[web.1]: Completed 404 Not Found in 11ms (ActiveRecord: 4.7ms)
2016-01-29T18:49:20.985358+00:00 heroku[router]: at=info method=GET path="/users/thirdlogo.png" host=www.faskyn.com request_id=e913ee09-3837-4da6-8e7f-f3eebc15de00 fwd="64.245.0.218" dyno=web.1 connect=0ms service=30ms status=404 bytes=840

Cant get MongoLab database to work on heroku

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.

Rendering template won't work on heroku but works locally

On my local machine, I can add a new user through a form and have rails send him an email. But on heroku, everything works until the part when the user has submitted the form and I am expecting to see something like the "welcome" page. That is the pages he's redirected to after registering.
production.rb
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
config.eager_load = true
# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Enable Rack::Cache to put a simple HTTP cache in front of your application
# Add `rack-cache` to your Gemfile before enabling this.
# For large-scale production use, consider using a caching reverse proxy like
# NGINX, varnish or squid.
# config.action_dispatch.rack_cache = true
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
# yet still be able to expire them through the digest params.
config.assets.digest = true
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = :debug
# Prepend all log lines with the following tags.
# config.log_tags = [ :subdomain, :uuid ]
# Use a different logger for distributed setups.
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = 'http://assets.example.com'
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
config.action_mailer.delivery_method = :smtp
# SMTP settings for gmail
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:user_name => ENV['myemail#gmail.com'],
:password => ENV['mypassword'],
:authentication => "plain",
:enable_starttls_auto => true }
end
investors_controller.rb
class InvestorsController < ApplicationController
def index
#change from Investor.first!!!
#investor = Investor.first
end
def show
#investor = Investor.find(params[:id])
end
def new
#investor = Investor.new
end
def create
#investor = Investor.new(user_params)
if #investor.save
flash[:info] = "Welcome, you're now on your way to success!"
render "/static_pages/welcome"
InvestorMailer.welcome_email(#investor).deliver_now
else
render 'new'
end
end
def update
if #investor.update_attributes(user_params)
flash[:success] = "Updated"
else
render 'edit'
end
end
private
def user_params
params.require(:investor).permit(:name, :email, :country,
:phone)
end
end
From the controller after an Investor is created, I render a template. That template shows fine on localhost but not on heroku.
I have tried heroku pg:reset but can't seem to find how to fix it. This is my heroku logs.
2015-06-11T11:47:21.908239+00:00 heroku[api]: Enable Logplex by siawmensah#gmail.com
2015-06-11T11:47:21.908239+00:00 heroku[api]: Release v2 created by siawmensah#gmail.com
2015-06-11T11:51:22.979153+00:00 heroku[api]: Set LANG, RAILS_ENV, RACK_ENV, SECRET_KEY_BASE, RAILS_SERVE_STATIC_FILES config vars by siawmensah#gmail.com
2015-06-11T11:51:22.979153+00:00 heroku[api]: Release v3 created by siawmensah#gmail.com
2015-06-11T11:51:23.395722+00:00 heroku[api]: Attach DATABASE resource by siawmensah#gmail.com
2015-06-11T11:51:23.395722+00:00 heroku[api]: Release v4 created by siawmensah#gmail.com
2015-06-11T11:51:23.621173+00:00 heroku[api]: Scale to web=1 by siawmensah#gmail.com
2015-06-11T11:51:23.717284+00:00 heroku[slug-compiler]: Slug compilation started
2015-06-11T11:51:23.717304+00:00 heroku[slug-compiler]: Slug compilation finished
2015-06-11T11:51:23.662060+00:00 heroku[api]: Deploy 12cea55 by siawmensah#gmail.com
2015-06-11T11:51:23.662060+00:00 heroku[api]: Release v5 created by siawmensah#gmail.com
2015-06-11T11:51:26.894425+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 29521 -e production`
2015-06-11T11:51:30.475571+00:00 app[web.1]: [2015-06-11 11:51:30] INFO WEBrick 1.3.1
2015-06-11T11:51:30.475610+00:00 app[web.1]: [2015-06-11 11:51:30] INFO ruby 2.0.0 (2015-04-13) [x86_64-linux]
2015-06-11T11:51:30.475901+00:00 app[web.1]: [2015-06-11 11:51:30] INFO WEBrick::HTTPServer#start: pid=3 port=29521
2015-06-11T11:51:31.005422+00:00 heroku[web.1]: State changed from starting to up
2015-06-11T11:56:53.289790+00:00 heroku[router]: at=info method=GET path="/" host=infinite-oasis-2303.herokuapp.com request_id=354682b8-2096-46ab-a299-8d04cbfa92a4 fwd="78.88.252.85" dyno=web.1 connect=1ms service=136ms status=500 bytes=1754
2015-06-11T11:56:53.491368+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-oasis-2303.herokuapp.com request_id=ded548e3-4670-4f72-8f55-b7b77d334515 fwd="78.88.252.85" dyno=web.1 connect=1ms service=8ms status=200 bytes=228
2015-06-11T11:58:12.228820+00:00 heroku[api]: Starting process with command `bundle exec rake db:create` by siawmensah#gmail.com
2015-06-11T11:58:16.855775+00:00 heroku[run.8863]: Awaiting client
2015-06-11T11:58:16.899503+00:00 heroku[run.8863]: Starting process with command `bundle exec rake db:create`
2015-06-11T11:58:17.195573+00:00 heroku[run.8863]: State changed from starting to up
2015-06-11T11:58:21.732727+00:00 heroku[run.8863]: Process exited with status 0
2015-06-11T11:58:21.744351+00:00 heroku[run.8863]: State changed from up to complete
2015-06-11T12:02:22.580784+00:00 heroku[router]: at=info method=GET path="/" host=infinite-oasis-2303.herokuapp.com request_id=fa00b3d2-92af-45e1-a377-d07682730c57 fwd="78.88.252.85" dyno=web.1 connect=1ms service=13ms status=500 bytes=1754
2015-06-11T12:02:33.888628+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by siawmensah#gmail.com
2015-06-11T12:02:37.574303+00:00 heroku[run.8055]: Awaiting client
2015-06-11T12:02:37.632103+00:00 heroku[run.8055]: Starting process with command `bundle exec rake db:migrate`
2015-06-11T12:02:37.950399+00:00 heroku[run.8055]: State changed from starting to up
2015-06-11T12:02:42.809261+00:00 heroku[run.8055]: State changed from up to complete
2015-06-11T12:02:42.795864+00:00 heroku[run.8055]: Process exited with status 0
2015-06-11T12:02:48.465779+00:00 heroku[router]: at=info method=GET path="/" host=infinite-oasis-2303.herokuapp.com request_id=b335d5c3-6057-4f55-83ff-7852c60043eb fwd="78.88.252.85" dyno=web.1 connect=2ms service=26ms status=200 bytes=1506
2015-06-11T12:02:48.665596+00:00 heroku[router]: at=info method=GET path="/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css" host=infinite-oasis-2303.herokuapp.com request_id=3850955a-f544-462c-bb56-659cf2a37004 fwd="78.88.252.85" dyno=web.1 connect=3ms service=5ms status=200 bytes=212
2015-06-11T12:02:49.142636+00:00 heroku[router]: at=info method=GET path="/assets/application-b598aa7e82e5647cd54ae6f409306995766dd0ce1af586bab9ebe84804d0eec0.js" host=infinite-oasis-2303.herokuapp.com request_id=aaa58ef4-4c05-467b-aeed-0c61755fc492 fwd="78.88.252.85" dyno=web.1 connect=1ms service=201ms status=200 bytes=117764
2015-06-11T12:03:04.152723+00:00 heroku[router]: at=info method=GET path="/investors/new" host=infinite-oasis-2303.herokuapp.com request_id=2573afdc-9a0a-4aab-a4ca-83215653cb4f fwd="78.88.252.85" dyno=web.1 connect=1ms service=32ms status=200 bytes=2207
2015-06-11T12:03:14.390979+00:00 heroku[router]: at=info method=POST path="/investors" host=infinite-oasis-2303.herokuapp.com request_id=1a95c9bc-ea25-4a75-bc51-ef385a06c765 fwd="78.88.252.85" dyno=web.1 connect=1ms service=567ms status=500 bytes=1754
2015-06-11T12:04:46.584140+00:00 heroku[router]: at=info method=POST path="/investors" host=infinite-oasis-2303.herokuapp.com request_id=661e547b-f2b9-459b-a15c-e4aca2a3fa16 fwd="78.88.252.85" dyno=web.1 connect=5ms service=322ms status=500 bytes=1754
2015-06-11T12:04:52.175142+00:00 heroku[router]: at=info method=GET path="/" host=infinite-oasis-2303.herokuapp.com request_id=9c97165a-fad1-453c-9902-2ea72a63f393 fwd="78.88.252.85" dyno=web.1 connect=1ms service=14ms status=200 bytes=1506
2015-06-11T12:04:52.349183+00:00 heroku[router]: at=info method=GET path="/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css" host=infinite-oasis-2303.herokuapp.com request_id=d1d85822-b7d2-49f6-b4a7-aab4640f9efc fwd="78.88.252.85" dyno=web.1 connect=1ms service=4ms status=304 bytes=133
2015-06-11T12:04:52.636697+00:00 heroku[router]: at=info method=GET path="/assets/application-b598aa7e82e5647cd54ae6f409306995766dd0ce1af586bab9ebe84804d0eec0.js" host=infinite-oasis-2303.herokuapp.com request_id=f12ec67a-29c2-494a-90c8-2fced158045b fwd="78.88.252.85" dyno=web.1 connect=1ms service=4ms status=304 bytes=133
2015-06-11T12:04:57.447980+00:00 heroku[router]: at=info method=GET path="/investors/new" host=infinite-oasis-2303.herokuapp.com request_id=8300be1c-136c-4595-aaa3-fcbec763358f fwd="78.88.252.85" dyno=web.1 connect=2ms service=12ms status=200 bytes=2207
2015-06-11T12:05:10.874873+00:00 heroku[router]: at=info method=POST path="/investors" host=infinite-oasis-2303.herokuapp.com request_id=5d322cae-1009-4a4a-b586-acbc1a1bb0be fwd="78.88.252.85" dyno=web.1 connect=2ms service=308ms status=500 bytes=1754
2015-06-11T12:07:25.348309+00:00 heroku[router]: at=info method=GET path="/" host=infinite-oasis-2303.herokuapp.com request_id=f45225d8-d1d9-4c2a-95e6-bbdb589ee80b fwd="78.88.252.85" dyno=web.1 connect=0ms service=13ms status=200 bytes=1506
2015-06-11T12:07:25.516873+00:00 heroku[router]: at=info method=GET path="/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css" host=infinite-oasis-2303.herokuapp.com request_id=8995aed0-688e-4f4f-87cb-fb32dd61bfb0 fwd="78.88.252.85" dyno=web.1 connect=1ms service=3ms status=304 bytes=133
2015-06-11T12:07:25.803024+00:00 heroku[router]: at=info method=GET path="/assets/application-b598aa7e82e5647cd54ae6f409306995766dd0ce1af586bab9ebe84804d0eec0.js" host=infinite-oasis-2303.herokuapp.com request_id=2b6eefdf-6e08-40cd-bbdc-9eddbb00b375 fwd="78.88.252.85" dyno=web.1 connect=1ms service=6ms status=304 bytes=133
2015-06-11T12:07:56.107177+00:00 heroku[router]: at=info method=GET path="/investors/new" host=infinite-oasis-2303.herokuapp.com request_id=f3ff502c-1a21-43bd-95ec-0557b63f83bc fwd="78.88.252.85" dyno=web.1 connect=0ms service=11ms status=200 bytes=2207
2015-06-11T12:08:04.826779+00:00 heroku[router]: at=info method=POST path="/investors" host=infinite-oasis-2303.herokuapp.com request_id=75971fd1-c059-4185-95e2-5d4e7a769366 fwd="78.88.252.85" dyno=web.1 connect=3ms service=314ms status=500 bytes=1754
The POST to /investors/new is raising a 500 error:
2015-06-11T12:05:10.874873+00:00 heroku[router]: at=info method=POST path="/investors" host=infinite-oasis-2303.herokuapp.com request_id=5d322cae-1009-4a4a-b586-acbc1a1bb0be fwd="78.88.252.85" dyno=web.1 connect=2ms service=308ms status=500 bytes=1754
My guess is this is something to do with the InvestorMailer... I'd check the configuration for that and ensure that is sending as my first steps.
Try removing the leading slash from "/static_pages/welcome". Heroku may be blocking that as a potential security exploit.

Redirect Loop with Heroku and Rails 4 App

My app runs fine locally, but when I push to Heroku, in Firefox it says "The page isn't redirecting properly" (i.e. a 302 error).
Running heroku logs results in a bunch of requests like this:
2015-06-02T21:30:26.556750+00:00 heroku[router]: at=info method=GET path="/" host=www.mydomainname.com request_id=a0cb3aa2-af7c-431a-9cc4-a237e551ae0a fwd="173.27.229.45" dyno=web.1 connect=2ms service=13ms status=302 bytes=499
2015-06-02T21:30:27.761039+00:00 heroku[router]: at=info method=GET path="/" host=www.mydomainname.com request_id=32026d7d-2167-4058-8ef6-8ebd15af7460 fwd="173.27.229.45" dyno=web.1 connect=2ms service=12ms status=302 bytes=499
2015-06-02T21:30:27.914344+00:00 heroku[router]: at=info method=GET path="/" host=www.mydomainname.com request_id=2087a90c-fd56-4d14-b630-9c92fda30c80 fwd="173.27.229.45" dyno=web.1 connect=1ms service=15ms status=302 bytes=499
When I run the "Network" option under Firefox's Developer section, it continuously shows that it is alternating between the domain with and without www. For example:
www.domain.com
domain.com
www.domain.com
domain.com
etc.
I am using a custom domain name but have it set up exactly how my other apps that are working are set up, so I don't think it is a DNS issue as far as how the setup goes. Also, when I visit the "myappname.herokuapp.com" URL, it immediately redirects to heroku.com for some reason. Not sure why. I ran the "Production Check" and it passes the "DNS configuration" section.
I realize that I have not provided a bunch of information here (not sure what else to provide), but any ideas on what I could look into next?
EDIT: Today it is saying this prior to the redirect code posted earlier:
2015-06-03T14:38:14.651296+00:00 heroku[web.2]: State changed from up to down
2015-06-03T14:38:17.135688+00:00 heroku[web.2]: Stopping all processes with SIGTERM
2015-06-03T14:38:17.774095+00:00 app[web.2]: [2015-06-03 14:38:17] FATAL SignalException: SIGTERM
2015-06-03T14:38:17.774101+00:00 app[web.2]: /app/vendor/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:170:in `select'
2015-06-03T14:38:17.774103+00:00 app[web.2]: /app/vendor/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:170:in `block in start'
2015-06-03T14:38:17.774104+00:00 app[web.2]: /app/vendor/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:32:in `start'
2015-06-03T14:38:17.774105+00:00 app[web.2]: /app/vendor/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:160:in `start'
2015-06-03T14:38:17.774106+00:00 app[web.2]: /app/vendor/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/handler/webrick.rb:35:in `run'
2015-06-03T14:38:17.774108+00:00 app[web.2]: /app/vendor/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/server.rb:286:in `start'
2015-06-03T14:38:17.774109+00:00 app[web.2]: /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/server.rb:80:in `start'
2015-06-03T14:38:17.774110+00:00 app[web.2]: /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
2015-06-03T14:38:17.774111+00:00 app[web.2]: /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
2015-06-03T14:38:17.774113+00:00 app[web.2]: /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
2015-06-03T14:38:17.774114+00:00 app[web.2]: /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2015-06-03T14:38:17.774115+00:00 app[web.2]: /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
2015-06-03T14:38:17.774117+00:00 app[web.2]: bin/rails:4:in `require'
2015-06-03T14:38:17.774118+00:00 app[web.2]: bin/rails:4:in `<main>'
2015-06-03T14:38:17.774147+00:00 app[web.2]: [2015-06-03 14:38:17] INFO WEBrick::HTTPServer#start done.
2015-06-03T14:38:17.774124+00:00 app[web.2]: [2015-06-03 14:38:17] INFO going to shutdown ...
2015-06-03T14:38:17.828035+00:00 app[web.2]: => Booting WEBrick
2015-06-03T14:38:17.828041+00:00 app[web.2]: => Rails 4.2.0 application starting in production on http://0.0.0.0:4223
2015-06-03T14:38:17.828043+00:00 app[web.2]: => Run `rails server -h` for more startup options
2015-06-03T14:38:17.828045+00:00 app[web.2]: => Ctrl-C to shutdown server
2015-06-03T14:38:17.828046+00:00 app[web.2]: Exiting
2015-06-03T14:38:18.624457+00:00 heroku[web.2]: Process exited with status 143
EDIT 2: I re-cloned the repository into a different directory and then ran heroku create, git push heroku master, and then heroku run rake db:migrate. I did this to eliminate any possible DNS issues. The log now says:
2015-06-03T15:55:51.082260+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=lit-inlet-1933.herokuapp.com request_id=2cd494b9-8f93-4270-b8db-e1dda9a6ab4a fwd="173.27.229.45" dyno= connect= service= status=503 bytes=
2015-06-03T15:55:51.274766+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=lit-inlet-1933.herokuapp.com request_id=78128ada-cb90-4580-8102-be756ec7b7cc fwd="173.27.229.45" dyno= connect= service= status=503 bytes=
2015-06-03T15:55:53.861456+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=lit-inlet-1933.herokuapp.com request_id=6d89785d-1b00-4b40-8984-15dbbe5e994f fwd="173.27.229.45" dyno= connect= service= status=503 bytes=
This shows 2 crashes to the root url "/" and 2 crashes on /favicon.ico. Based on the favicon.ico, I removed any favicons from the root page as a test. Now the app is behaving similarly to the earlier one: It immediately redirects to heroku.com instead of loading the page and the logs says:
2015-06-03T16:00:42.804253+00:00 heroku[web.1]: State changed from crashed to starting
2015-06-03T16:00:48.568268+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 25258 -e production`
2015-06-03T16:00:57.769255+00:00 app[web.1]: [2015-06-03 16:00:57] INFO WEBrick 1.3.1
2015-06-03T16:00:57.769284+00:00 app[web.1]: [2015-06-03 16:00:57] INFO ruby 2.1.5 (2014-11-13) [x86_64-linux]
2015-06-03T16:00:57.769643+00:00 app[web.1]: [2015-06-03 16:00:57] INFO WEBrick::HTTPServer#start: pid=3 port=25258
2015-06-03T16:00:58.321124+00:00 heroku[web.1]: State changed from starting to up
2015-06-03T16:01:00.754258+00:00 heroku[router]: at=info method=GET path="/" host=lit-inlet-1933.herokuapp.com request_id=8664d409-5542-4bee-914d-00639c08c2d0 fwd="173.27.229.45" dyno=web.1 connect=1ms service=174ms status=302 bytes=501
The root URL is very simple. There is a welcome_controller:
class WelcomeController < ApplicationController
skip_before_filter :authenticate_user!, only: :index
def index
end
end
and the view is:
<div class="jumbotron">
<h1> Task Clash</h1>
<p>A ridiculously simple and easy-to-use CRM/Time Tracking tool aimed at small businesses!</p>
<p><%= link_to "Create Account", new_account_path, class: "btn btn-primary btn-lg" %></p>
</div>
Any help would be greatly appreciated!
EDIT 3: I added rails_12factor to my Gemfile and now get this:
2015-06-03T19:37:48.713189+00:00 heroku[router]: at=info method=GET path="/" host=www.taskclash.com request_id=c0dfd7ac-233c-4be9-a155-57b66f9a84cb fwd="173.27.229.45" dyno=web.1 connect=0ms service=12ms status=302 bytes=435
2015-06-03T19:37:48.700898+00:00 app[web.1]: Started GET "/" for 173.27.229.45 at 2015-06-03 19:37:48 +0000
2015-06-03T19:37:48.710826+00:00 app[web.1]: Account Load (1.4ms) SELECT "public"."accounts".* FROM "public"."accounts" WHERE "public"."accounts"."subdomain" = $1 LIMIT 1 [["subdomain", "www"]]
2015-06-03T19:37:48.711577+00:00 app[web.1]: Filter chain halted as :load_schema rendered or redirected
2015-06-03T19:37:48.711704+00:00 app[web.1]: Completed 302 Found in 8ms (ActiveRecord: 6.5ms)
2015-06-03T19:37:48.703333+00:00 app[web.1]: Processing by TasksController#index as HTML
2015-06-03T19:37:48.711291+00:00 app[web.1]: Redirected to https://taskclash.com/
Check if there's a production migration pending. Run from the terminal this command:
$ heroku run rake db:migrate
If there are no migrations pending, post more lines of the logs.

Resources