rails4.2 heroku cloudfront serving static assets - ruby-on-rails

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

Related

Devise Sign Up Freeze

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.

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.

Rails says Heroku IP is not whitelisted (even though it is) for Sendgrid Devise Emails

RESOLVED (kinda)
I'm afraid the plethora of existing questions and resources for this topic don't seem to solve my issues.
I'm getting a success message from my site, but Heroku is saying that only the local loopback IP address is authorized to render consoles, despite the fact that I white listed the IP address that Heroku is using.
Log excerpt:
2015-07-06T20:20:12.137924+00:00 app[web.1]: Cannot render console from 98.117.13.138! Allowed networks: 98.117.13.138, 127.0.0.0/127.255.255.255, ::1
application.rb Whitelist:
config.web_console.whitelisted_ips = '98.117.13.138'
Below is the relevant configuration code.
I'm using Heroku and Sendgrid with Devise. The process I'm using to test is the 'reset password' feature.
production.rb
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
Rails.application.routes.default_url_options[:host] = 'my_host_address'
smtp.rb Initializer
ActionMailer::Base.smtp_settings = {
:address => "smtp.sendgrid.net",
:port => "587",
:authentication => :plain,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:domain => 'heroku.com',
:host => 'my_host_address'
}
devise.rb Initializer
Devise.setup do |config|
config.mailer_sender = 'noreply#qwesteraherokuapp.com'
require 'devise/orm/active_record'
config.case_insensitive_keys = [:email]
config.strip_whitespace_keys = [:email]
config.skip_session_storage = [:http_auth]
config.stretches = Rails.env.test? ? 1 : 10
config.reconfirmable = false
config.expire_all_remember_me_on_sign_out = true
config.password_length = 8..72
config.reset_password_within = 6.hours
config.sign_out_via = :delete
config.secret_key = 'my_secret_key'
end
$ heroku logs
2015-07-06T20:20:08.968204+00:00 heroku[run.8217]: State changed from up to complete
2015-07-06T20:20:13.271484+00:00 app[web.1]: Processing by Devise::PasswordsController#new as HTML
2015-07-06T20:20:13.397112+00:00 app[web.1]: Rendered devise/passwords/new.html.erb within layouts/application (39.7ms)
2015-07-06T20:20:13.420795+00:00 heroku[router]: at=info method=GET path="/u/users/password/new" host=qwestera.herokuapp.com request_id=21639047-f729-4cc3-bdbf-1fbcbf22760d fwd="98.117.13.138" dyno=web.1 connect=1ms service=1296ms status=200 bytes=4354
2015-07-06T20:20:13.396891+00:00 app[web.1]: Rendered devise/shared/_links.html.erb (11.4ms)
2015-07-06T20:20:13.408958+00:00 app[web.1]: Completed 200 OK in 137ms (Views: 54.8ms | ActiveRecord: 12.6ms)
2015-07-06T20:20:13.573078+00:00 heroku[router]: at=info method=GET path="/assets/Site_Logo_Black-2a4f3fed4b2570b6f751326139586e697488ae75b60f3d19550bb1279c29922c.png" host=qwestera.herokuapp.com request_id=e96655d5-39c4-41c9-b37d-a5fd1cca66ae fwd="98.117.13.138" dyno=web.1 connect=0ms service=4ms status=304 bytes=133
2015-07-06T20:20:13.626264+00:00 heroku[router]: at=info method=GET path="/assets/bootstrap/glyphicons-halflings-regular-fe185d11a49676890d47bb783312a0cda5a44c4039214094e7957b4c040ef11c.woff2" host=qwestera.herokuapp.com request_id=3e3925f9-b3c8-4699-ba45-0fda48217fea fwd="98.117.13.138" dyno=web.1 connect=1ms service=6ms status=304 bytes=133
2015-07-06T20:20:13.584094+00:00 heroku[router]: at=info method=GET path="/assets/application-1e5c3b1b77c2c96cc6a13c45ea618b3966d23885add868456ed0df7c69558c9d.js" host=qwestera.herokuapp.com request_id=f7b586ca-4f05-418c-866d-e45a49fbb2a2 fwd="98.117.13.138" dyno=web.1 connect=4ms service=9ms status=304 bytes=133
2015-07-06T20:20:13.624068+00:00 heroku[router]: at=info method=GET path="/assets/Grey_Stripe-c8b5e65dcd52152bd03304887bcb689bd01bf10d0a6159f454c6da221ae8bee1.png" host=qwestera.herokuapp.com request_id=6c6d8122-1f27-496e-9627-484d45f1e1c6 fwd="98.117.13.138" dyno=web.1 connect=1ms service=5ms status=304 bytes=133
2015-07-06T20:20:13.562547+00:00 heroku[router]: at=info method=GET path="/assets/application-e3e49b6823ad75932b2c57d4cea86a6f8e5764b394af3a28b0779a42bbf360f4.css" host=qwestera.herokuapp.com request_id=29f4deaa-e38b-41e5-b106-077705305d71 fwd="98.117.13.138" dyno=web.1 connect=2ms service=6ms status=304 bytes=133
2015-07-06T20:20:13.656922+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=qwestera.herokuapp.com request_id=2ee0e849-277b-4996-8925-2064c10b3010 fwd="98.117.13.138" dyno=web.1 connect=2ms service=4ms status=200 bytes=228
2015-07-06T20:20:17.282767+00:00 app[web.1]: Started POST "/u/users/password" for 98.117.13.138 at 2015-07-06 20:20:17 +0000
2015-07-06T20:20:17.298525+00:00 app[web.1]: User Load (1.7ms) SELECT "users".* FROM "users" WHERE "users"."email" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["email", "baughmann1#gmail.com"]]
2015-07-06T20:20:17.286220+00:00 app[web.1]: Processing by Devise::PasswordsController#create as HTML
2015-07-06T20:20:17.283508+00:00 app[web.1]: Cannot render console from 98.117.13.138! Allowed networks: 98.117.13.138, 127.0.0.0/127.255.255.255, ::1
2015-07-06T20:20:17.286465+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"Vofz0oUxwctFlOplx61cSineCElHOl0KJNeQv52gyMRXta4EXhLy7agZGrEWHpNOTSw6BNNdLocBqd11yp92gQ==", "user"=>{"email"=>"baughmann1#gmail.com"}, "commit"=>"Send me reset password instructions"}
2015-07-06T20:20:17.560246+00:00 app[web.1]: User Load (1.3ms) SELECT "users".* FROM "users" WHERE "users"."reset_password_token" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["reset_password_token", "e80068946760c81716c8afee3cb57a6c961af0c4c47f7772bbf5236ff8b282d8"]]
2015-07-06T20:20:17.566867+00:00 app[web.1]: SQL (1.3ms) UPDATE "users" SET "reset_password_token" = $1, "reset_password_sent_at" = $2, "updated_at" = $3 WHERE "users"."id" = $4 [["reset_password_token", "e80068946760c81716c8afee3cb57a6c961af0c4c47f7772bbf5236ff8b282d8"], ["reset_password_sent_at", "2015-07-06 20:20:17.560703"], ["updated_at", "2015-07-06 20:20:17.562609"], ["id", 1]]
2015-07-06T20:20:17.581314+00:00 app[web.1]: Rendered devise/mailer/reset_password_instructions.html.erb (1.0ms)
2015-07-06T20:20:17.562268+00:00 app[web.1]: (1.0ms) BEGIN
2015-07-06T20:20:17.569810+00:00 app[web.1]: (2.1ms) COMMIT
2015-07-06T20:20:17.759415+00:00 app[web.1]:
2015-07-06T20:20:17.759424+00:00 app[web.1]: Devise::Mailer#reset_password_instructions: processed outbound mail in 186.4ms
2015-07-06T20:20:17.960140+00:00 heroku[router]: at=info method=POST path="/u/users/password" host=qwestera.herokuapp.com request_id=39d72953-5e4d-4851-8202-2e18119f918a fwd="98.117.13.138" dyno=web.1 connect=0ms service=684ms status=302 bytes=1188
2015-07-06T20:20:17.996691+00:00 heroku[router]: at=info method=GET path="/u/users/sign_in" host=qwestera.herokuapp.com request_id=93dfa4e6-ba11-4aa3-925b-85392814217c fwd="98.117.13.138" dyno=web.1 connect=2ms service=19ms status=200 bytes=4318
2015-07-06T20:20:17.952283+00:00 app[web.1]:
2015-07-06T20:20:17.952298+00:00 app[web.1]: From: noreply#qwesteraherokuapp.com
2015-07-06T20:20:17.952289+00:00 app[web.1]: Sent mail to baughmann1#gmail.com (192.7ms)
2015-07-06T20:20:17.952296+00:00 app[web.1]: Date: Mon, 06 Jul 2015 20:20:17 +0000
2015-07-06T20:20:17.952306+00:00 app[web.1]: Mime-Version: 1.0
2015-07-06T20:20:17.952299+00:00 app[web.1]: Reply-To: noreply#qwesteraherokuapp.com
2015-07-06T20:20:17.952303+00:00 app[web.1]: Message-ID: <559ae301ba679_33fac020282ec154d7#07e16014-4ccc-4f8a-863c-f2004129eb1c.mail>
2015-07-06T20:20:17.952304+00:00 app[web.1]: Subject: Reset password instructions
2015-07-06T20:20:17.952307+00:00 app[web.1]: Content-Type: text/html;
2015-07-06T20:20:17.952310+00:00 app[web.1]: Content-Transfer-Encoding: 7bit
2015-07-06T20:20:17.952309+00:00 app[web.1]: charset=UTF-8
2015-07-06T20:20:17.952314+00:00 app[web.1]:
2015-07-06T20:20:17.952316+00:00 app[web.1]: <p>Someone has requested a link to change your password. You can do this through the link below.</p>
2015-07-06T20:20:17.952301+00:00 app[web.1]: To: baughmann1#gmail.com
2015-07-06T20:20:17.952311+00:00 app[web.1]:
2015-07-06T20:20:17.952313+00:00 app[web.1]: <p>Hello baughmann1#gmail.com!</p>
2015-07-06T20:20:17.952317+00:00 app[web.1]:
2015-07-06T20:20:17.952321+00:00 app[web.1]: <p>If you didn't request this, please ignore this email.</p>
2015-07-06T20:20:17.952319+00:00 app[web.1]: <p>Change my password</p>
2015-07-06T20:20:17.952320+00:00 app[web.1]:
2015-07-06T20:20:17.952324+00:00 app[web.1]:
2015-07-06T20:20:17.952323+00:00 app[web.1]: <p>Your password won't change until you access the link above and create a new one.</p>
2015-07-06T20:20:17.982666+00:00 app[web.1]: Started GET "/u/users/sign_in" for 98.117.13.138 at 2015-07-06 20:20:17 +0000
2015-07-06T20:20:17.986717+00:00 app[web.1]: Processing by Devise::SessionsController#new as HTML
2015-07-06T20:20:17.956543+00:00 app[web.1]: Redirected to http://qwestera.herokuapp.com/u/users/sign_in
2015-07-06T20:20:17.956688+00:00 app[web.1]: Completed 302 Found in 670ms (ActiveRecord: 8.6ms)
2015-07-06T20:20:17.983132+00:00 app[web.1]: Cannot render console from 98.117.13.138! Allowed networks: 98.117.13.138, 127.0.0.0/127.255.255.255, ::1
2015-07-06T20:20:17.994017+00:00 app[web.1]: Rendered devise/shared/_links.html.erb (0.5ms)
2015-07-06T20:20:17.994076+00:00 app[web.1]: Rendered devise/sessions/new.html.erb within layouts/application (3.4ms)
2015-07-06T20:20:17.995516+00:00 app[web.1]: Completed 200 OK in 9ms (Views: 6.3ms | ActiveRecord: 0.0ms)
Heroku's Logs were saying that the connection was blocked. However, it went through anyway. I moved config.web_console.whitelisted_ips = '98.117.13.138' from application.rb into production.rb anyway.

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