500 error after pushing to heroku - DEBUG - ruby-on-rails

Im having an openuri issue when in production. The code below works in development but when in production the unauthorized error comes up. The only way i've solved this is if i put the api key directly in the url, which obviously i dont want to do. Any ideas why my current code doesnt work?
api_key = ENV["NEWS_API"]
url = "https://newsapi.org/v2/top-headlines?sources=techcrunch&apiKey=#{api_key}"
article_serialized = open(url).read
#articles = JSON.parse(article_serialized)
2018-10-25T01:55:47.184856+00:00 app[web.1]: F, [2018-10-25T01:55:47.184804 #4] FATAL -- : [40a7ee38-ef6e-4622-ad86-edb34d7eeccf] OpenURI::HTTPError (401 Unauthorized):
Running rails db:migrate on ⬢ twittter-clone... up, run.6483 (Free)
D, [2018-10-25T01:12:44.387465 #4] DEBUG -- : (0.9ms) SELECT pg_try_advisory_lock(2661719123600558280)
D, [2018-10-25T01:12:44.433095 #4] DEBUG -- : (2.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
D, [2018-10-25T01:12:44.456835 #4] DEBUG -- : ActiveRecord::InternalMetadata Load (3.8ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
D, [2018-10-25T01:12:44.480937 #4] DEBUG -- : (5.3ms) BEGIN
D, [2018-10-25T01:12:44.485057 #4] DEBUG -- : (1.7ms) COMMIT
D, [2018-10-25T01:12:44.492822 #4] DEBUG -- : (7.1ms) SELECT pg_advisory_unlock(2661719123600558280)

OpenURI returns a 401 error and my guess is that the ENV['NEWS_API'] is not set. You can run heroku config in the terminal or look it up on the web interface: Settings -> Reveal Config Vars

Related

Rails record update works locally but not in production

Any reason why a simple update would work locally but not in production on heroku (the repos are identical, everything up to date)? In the logs below I can see the parameter to be updated is making it into the request, but somehow the sql output only updates updated at:
Video Update (3.1ms) UPDATE "videos" SET "updated_at" = $1 WHERE "videos"."id" = $2 [["updated_at", "2018-01-07 20:54:51.465131"], ["id", 85]]
In Development the exact same code produces in the dev server logs:
Video Update (0.7ms) UPDATE "videos" SET "imdb_id" = $1, "updated_at" = $2 WHERE "videos"."id" = $3 [["imdb_id", "566"], ["updated_at", "2018-01-07 20:09:28.366552"], ["id", 119]]
So an update is being made but without the parameter, even though the param is whitelisted and included in the request log. I'm not even sure what information to include with this question or where the problem is (rails, postgres, heroku).
My production log:
2018-01-07T20:54:51.408709+00:00 app[web.1]: I, [2018-01-07T20:54:51.408622 #4] INFO -- : [6fad6a5f-021f-46ec-93a8-de53735f66f1] Processing by VideosController#update as HTML
2018-01-07T20:54:51.408843+00:00 app[web.1]: I, [2018-01-07T20:54:51.408752 #4] INFO -- : [6fad6a5f-021f-46ec-93a8-de53735f66f1] Parameters: {"utf8"=>"✓", "authenticity_token"=>"NJR5RNVHisPn1rDbglvmEIE80fk3pZjEfZ0YqOpXKGldRLR2JitrJrGf/syXfMaO8AiMtvo7N/EJqM/ToLkSLQ==", "file"=>"", "video"=>{"title"=>"Coco", "description"=>"", "imdb_id"=>"777", "public"=>"true"}, "commit"=>"Update", "id"=>"85"}
2018-01-07T20:54:51.445716+00:00 app[web.1]: D, [2018-01-07T20:54:51.445569 #4] DEBUG -- : [6fad6a5f-021f-46ec-93a8-de53735f66f1] Video Load (7.6ms) SELECT "videos".* FROM "videos" WHERE "videos"."id" = $1 LIMIT $2 [["id", 85], ["LIMIT", 1]]
2018-01-07T20:54:51.448739+00:00 app[web.1]: D, [2018-01-07T20:54:51.448624 #4] DEBUG -- : [6fad6a5f-021f-46ec-93a8-de53735f66f1] User Load (1.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 7], ["LIMIT", 1]]
2018-01-07T20:54:51.451649+00:00 app[web.1]: D, [2018-01-07T20:54:51.451565 #4] DEBUG -- : [6fad6a5f-021f-46ec-93a8-de53735f66f1] (0.9ms) BEGIN
2018-01-07T20:54:51.459864+00:00 app[web.1]: D, [2018-01-07T20:54:51.459743 #4] DEBUG -- : [6fad6a5f-021f-46ec-93a8-de53735f66f1] User Load (5.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 7], ["LIMIT", 1]]
2018-01-07T20:54:51.485827+00:00 app[web.1]: D, [2018-01-07T20:54:51.485674 #4] DEBUG -- : [6fad6a5f-021f-46ec-93a8-de53735f66f1] Video Update (3.1ms) UPDATE "videos" SET "updated_at" = $1 WHERE "videos"."id" = $2 [["updated_at", "2018-01-07 20:54:51.465131"], ["id", 85]]
2018-01-07T20:54:51.490476+00:00 app[web.1]: D, [2018-01-07T20:54:51.490385 #4] DEBUG -- : [6fad6a5f-021f-46ec-93a8-de53735f66f1] (2.4ms) COMMIT
2018-01-07T20:54:51.491713+00:00 app[web.1]: I, [2018-01-07T20:54:51.491568 #4] INFO -- : [6fad6a5f-021f-46ec-93a8-de53735f66f1] Redirected to https://www.browzable.com/library
It worked after I restarted Heroku. Maybe it didn't restart after my migration.

Heroku Not Receiving Seed Data from Rails App

I deployed a Rails App to Heroku and the database migrated fine, except the db/seeds.rb file won't push to Heroku. I've tried running heroku run rake db:seed, as well as all the other solutions suggested online, but nothing is working. Heroku doesn't seem to have access to the seeds.rb file at all.
After running heroku run db:seed, nothing seems to happen of worth:
Running rake db:seed on ⬢ top5application... up, run.1885 (Free)
D, [2017-11-02T05:42:19.665233 #4] DEBUG -- :
ActiveRecord::SchemaMigration Load (1.3ms) SELECT
"schema_migrations".* FROM "schema_migrations"
The Heroku logs also don't seem to contain any useful information:
1d22032e7d7e fwd="69.201.160.131" dyno=web.1 connect=0ms service=17ms status=200 bytes=4542 protocol=https
2017-11-02T05:13:34.409329+00:00 app[web.1]: I, [2017-11-02T05:13:34.409232 #4] INFO -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e] Started GET "/lists" for 69.201.160.131 at 2017-11-02 05:13:34 +0000
2017-11-02T05:13:34.410736+00:00 app[web.1]: I, [2017-11-02T05:13:34.410667 #4] INFO -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e] Processing by ListsController#index as HTML
2017-11-02T05:13:34.413696+00:00 app[web.1]: D, [2017-11-02T05:13:34.413601 #4] DEBUG -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e] [1m[36mList Load (0.9ms)[0m [1m[34mSELECT "lists".* FROM "lists" ORDER BY average_rating DESC[0m
2017-11-02T05:13:34.415282+00:00 app[web.1]: I, [2017-11-02T05:13:34.415205 #4] INFO -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e] Rendering lists/index.html.erb within layouts/application
2017-11-02T05:13:34.417088+00:00 app[web.1]: D, [2017-11-02T05:13:34.416900 #4] DEBUG -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e] [1m[36mList Load (0.8ms)[0m [1m[34mSELECT "lists".* FROM "lists" ORDER BY "lists"."created_at" DESC[0m
2017-11-02T05:13:34.418866+00:00 app[web.1]: D, [2017-11-02T05:13:34.418785 #4] DEBUG -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e] [1m[36mTopic Load (0.7ms)[0m [1m[34mSELECT "topics".* FROM "topics"[0m
2017-11-02T05:13:34.419839+00:00 app[web.1]: I, [2017-11-02T05:13:34.419757 #4] INFO -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e] Rendered lists/index.html.erb within layouts/application (4.3ms)
2017-11-02T05:13:34.422316+00:00 app[web.1]: D, [2017-11-02T05:13:34.422246 #4] DEBUG -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e] [1m[36mUser Load (0.9ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
2017-11-02T05:13:34.423714+00:00 app[web.1]: I, [2017-11-02T05:13:34.423652 #4] INFO -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e] Rendered layouts/_logged_in.erb (0.8ms)
2017-11-02T05:13:34.423973+00:00 app[web.1]: I, [2017-11-02T05:13:34.423915 #4] INFO -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e] Completed 200 OK in 13ms (Views: 7.0ms | ActiveRecord: 3.3ms)
I'd really appreciate any insight because this is very perplexing.

Why is this object undefined? Ruby, Rails, Gmail error

I can't seem to figure out why I am getting the error :
2017-01-03T02:57:35.239505+00:00 app[web.1]: I, [2017-01-03T02:57:35.239437 #4] INFO -- : [89b504ee-5835-4bfa-a3ff-91a3a84549f6] Parameters: {"id"=>"3"}
2017-01-03T02:57:35.243975+00:00 app[web.1]: D, [2017-01-03T02:57:35.243890 #4] DEBUG -- : [89b504ee-5835-4bfa-a3ff-91a3a84549f6] User Load (1.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 22], ["LIMIT", 1]]
2017-01-03T02:57:35.468562+00:00 app[web.1]: true
2017-01-03T02:57:35.476648+00:00 app[web.1]: D, [2017-01-03T02:57:35.476563 #4] DEBUG -- : [89b504ee-5835-4bfa-a3ff-91a3a84549f6] Blueprint Load (2.7ms) SELECT "blueprints".* FROM "blueprints" WHERE "blueprints"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]]
2017-01-03T02:57:35.477654+00:00 app[web.1]: I, [2017-01-03T02:57:35.477582 #4] INFO -- : [89b504ee-5835-4bfa-a3ff-91a3a84549f6] Completed 500 Internal Server Error in 238ms (ActiveRecord: 5.5ms)
2017-01-03T02:57:35.478257+00:00 app[web.1]: F, [2017-01-03T02:57:35.478177 #4] FATAL -- : [89b504ee-5835-4bfa-a3ff-91a3a84549f6]
2017-01-03T02:57:35.478313+00:00 app[web.1]: F, [2017-01-03T02:57:35.478256 #4] FATAL -- : [89b504ee-5835-4bfa-a3ff-91a3a84549f6] Gmail::Client::DeliveryError (Couldn't deliver email: undefined method `subject' for nil:NilClass):
For some reason the object #current_blueprint doesn't seem to be working inside of the gmail.deliver block. Am I missing something obvious?
Appreciate any help. Thanks!
#current_blueprint = Blueprint.find(params[:id])
mail_status = gmail.deliver! do
to "email#gmail.com"
subject #current_blueprint.subject
html_part do
content_type 'text/html; charset=UTF-8'
body #current_blueprint.body
end
end
puts mail_status
Try just current_blueprint without the # sign.
Sometime a library executes a do end with a different self and can thus not access instance variables, but it should be able to access local variables that are in scope.
Just guessing, let me know whether it works.

Rails and Heroku - Rake db:seed only populates some databases and not others?

I have a rails app that I've been working on locally and have deployed to heroku. I have a lot of data that needs to be seeded that has worked well locally, with a small issue that I didn't pay much mind to. Basically I have a number of tables covering:
Feature,
Addon,
Budget,
ProjectType
Industry
etc.
When I create/reset the local database and run the rake db:seed it seeds perfectly to each database.
However, as its a WIP I keep adding new tables and running the seed rake db:seed, and noticed that where it should have been doubling up all of the seeded data (because I never cleared the data), it actually only duplicated this info on the Addon, and Feature tables. The other tables were unchanged. I thought nothing of it, until I started trying to run heroku run rake db:seed to populate my production database and noticed that in the logs it was also only populating the Addon and Feature tables, and skipping over the rest.
An extract from some of my seed file (I've shortened with ... as they are very repetitive but all the same):
#Populate the features table
Feature.destroy_all
Feature.create(id: 1, name: 'Contact form')
Feature.create(id: 2, name: 'Blog')
Feature.create(id: 3, name: 'Mailing list signup')
...
...
#Populate the addons table
Addon.destroy_all
Addon.create(id: 1, name: 'Domain registration')
Addon.create(id: 2, name: 'Hosting')
Addon.create(id: 3, name: 'Create content')
...
...
#Populating the industries table
Industry.destroy_all
Industry.create(id: 1, name: 'Accounting')
Industry.create(id: 2, name: 'Airlines')
Industry.create(id: 3, name: 'Alternative Medicine')
...
...
# Populating the budgets table
Budget.destroy_all
Budget.create(id: 1, name: 'Micro', minimum: 250, maximum: 1000)
Budget.create(id: 2, name: 'Simple', minimum: 1000, maximum: 2500)
...
...
I noticed that when I try populate the heroku database with heroku run rake db:seed the data all seems to "rollback". Here is an extract from the console:
First I run heroku run rake db:migrate
D, [2016-09-01T12:24:31.463009 #3] DEBUG -- : (1.8ms) SELECT pg_try_advisory_lock(4467995963834188590);
D, [2016-09-01T12:24:31.476939 #3] DEBUG -- : ActiveRecord::SchemaMigration Load (1.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
D, [2016-09-01T12:24:31.507280 #3] DEBUG -- : ActiveRecord::InternalMetadata Load (1.8ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", :environment], ["LIMIT", 1]]
D, [2016-09-01T12:24:31.518500 #3] DEBUG -- : (1.7ms) BEGIN
D, [2016-09-01T12:24:31.522494 #3] DEBUG -- : (1.7ms) COMMIT
D, [2016-09-01T12:24:31.524504 #3] DEBUG -- : (1.8ms) SELECT pg_advisory_unlock(4467995963834188590)
Then I run rake heroku run rake db:seed
For the tables where it doesn't work it seems to do this:
D, [2016-09-01T12:27:28.229540 #3] DEBUG -- : ActiveRecord::SchemaMigration Load (2.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
D, [2016-09-01T12:27:28.261528 #3] DEBUG -- : Budget Load (2.3ms) SELECT "budgets".* FROM "budgets"
D, [2016-09-01T12:27:28.293954 #3] DEBUG -- : (1.7ms) BEGIN
D, [2016-09-01T12:27:28.320090 #3] DEBUG -- : (1.9ms) ROLLBACK
D, [2016-09-01T12:27:28.322421 #3] DEBUG -- : (1.7ms) BEGIN
D, [2016-09-01T12:27:28.325418 #3] DEBUG -- : (1.8ms) ROLLBACK
D, [2016-09-01T12:27:28.327617 #3] DEBUG -- : (1.7ms) BEGIN
D, [2016-09-01T12:27:28.331031 #3] DEBUG -- : (1.8ms) ROLLBACK
D, [2016-09-01T12:27:28.333423 #3] DEBUG -- : (1.8ms) BEGIN
D, [2016-09-01T12:27:28.338379 #3] DEBUG -- : (2.5ms) ROLLBACK
D, [2016-09-01T12:27:28.340601 #3] DEBUG -- : (1.7ms) BEGIN
D, [2016-09-01T12:27:28.344061 #3] DEBUG -- : (1.7ms) ROLLBACK
D, [2016-09-01T12:27:28.346208 #3] DEBUG -- : (1.7ms) BEGIN
D, [2016-09-01T12:27:28.349342 #3] DEBUG -- : (1.8ms) ROLLBACK
D, [2016-09-01T12:27:28.353205 #3] DEBUG -- : (3.4ms) BEGIN
D, [2016-09-01T12:27:28.358254 #3] DEBUG -- : (2.5ms) ROLLBACK
D, [2016-09-01T12:27:28.360392 #3] DEBUG -- : (1.7ms) BEGIN
D, [2016-09-01T12:27:28.363406 #3] DEBUG -- : (1.8ms) ROLLBACK
D, [2016-09-01T12:27:28.365488 #3] DEBUG -- : (1.6ms) BEGIN
D, [2016-09-01T12:27:28.367862 #3] DEBUG -- : (1.7ms) ROLLBACK
D, [2016-09-01T12:27:28.369869 #3] DEBUG -- : (1.7ms) BEGIN
D, [2016-09-01T12:27:28.372657 #3] DEBUG -- : (1.8ms) ROLLBACK
D, [2016-09-01T12:27:28.378093 #3] DEBUG -- : Industry Load (2.1ms) SELECT "industries".* FROM "industries"
D, [2016-09-01T12:27:28.393455 #3] DEBUG -- : (1.8ms) BEGIN
D, [2016-09-01T12:27:28.409125 #3] DEBUG -- : (1.7ms) ROLLBACK
D, [2016-09-01T12:27:28.411280 #3] DEBUG -- : (1.6ms) BEGIN
D, [2016-09-01T12:27:28.414223 #3] DEBUG -- : (1.6ms) ROLLBACK
D, [2016-09-01T12:27:28.416244 #3] DEBUG -- : (1.7ms) BEGIN
D, [2016-09-01T12:27:28.419335 #3] DEBUG -- : (1.7ms) ROLLBACK
D, [2016-09-01T12:27:28.421511 #3] DEBUG -- : (1.7ms) BEGIN
D, [2016-09-01T12:27:28.425412 #3] DEBUG -- : (1.7ms) ROLLBACK
D, [2016-09-01T12:27:28.427570 #3] DEBUG -- : (1.7ms) BEGIN
D, [2016-09-01T12:27:28.431136 #3] DEBUG -- : (1.7ms) ROLLBACK
D, [2016-09-01T12:27:28.433536 #3] DEBUG -- : (2.0ms) BEGIN
D, [2016-09-01T12:27:28.438208 #3] DEBUG -- : (1.7ms) ROLLBACK
D, [2016-09-01T12:27:28.440437 #3] DEBUG -- : (1.7ms) BEGIN
And then when it passes over the features and addons, it seems to work fine:
D, [2016-09-01T12:27:29.506570 #3] DEBUG -- : SQL (1.9ms) INSERT INTO "features" ("id", "name", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["id", 1], ["name", "Contact form"], ["created_at", 2016-09-01 12:27:29 UTC], ["updated_at", 2016-09-01 12:27:29 UTC]]
D, [2016-09-01T12:27:29.509515 #3] DEBUG -- : (2.5ms) COMMIT
D, [2016-09-01T12:27:29.512944 #3] DEBUG -- : (2.2ms) BEGIN
D, [2016-09-01T12:27:29.516551 #3] DEBUG -- : SQL (1.9ms) INSERT INTO "features" ("id", "name", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["id", 2], ["name", "Blog"], ["created_at", 2016-09-01 12:27:29 UTC], ["updated_at", 2016-09-01 12:27:29 UTC]]
D, [2016-09-01T12:27:29.519489 #3] DEBUG -- : (2.5ms) COMMIT
D, [2016-09-01T12:27:29.522216 #3] DEBUG -- : (2.5ms) BEGIN
D, [2016-09-01T12:27:29.526125 #3] DEBUG -- : SQL (1.9ms) INSERT INTO "features" ("id", "name", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["id", 3], ["name", "Mailing list signup"], ["created_at", 2016-09-01 12:27:29 UTC], ["updated_at", 2016-09-01 12:27:29 UTC]]
I did notice that of the tables, Addons and Features both have a has_and_belongs_to_many association with other tables while the rest of the tables that aren't working have a belongs_to association with some other tables. Not sure if that is just a coincidence? Thanks for any help!
Ok from what I can tell this appears to be an issue with seeding databases of belongs_to models. I worked around this by:
Going into each model and #'ing the belongs_to relationship. I then repushed with:
git add .
git commit -m "hashed belongs_to associations"
git push
git push heroku master
heroku run rake db:seed
When I checked the database, it's seems to be perfect now. I will now unhash the relationships, re git and re push to heroku.
Why dont you try using find_or_create_by! method which will first check if the record exist and only create if it does not exist.:
Feature.find_or_create_by!(name: 'Contact form')
Also it will take care of validation when you use the bang sign at the end of the method. you also do not have to mention the id here. As you are providing the id, that might be creating an issue for you.
Let me know if you still face any issue.
Since Rails 5.1 belongs_to-associated objects are required by default (see https://blog.bigbinary.com/2016/02/15/rails-5-makes-belong-to-association-required-by-default.html). Maybe some of the belongs_to-associations of your seeded models are not existing, that's why heroku won’t seed the models since presence-validation fails.
One easy solution is to flag the associations as optional:
class Budget
belongs_to :feature, optional: true
....
end

Rails/Angular app works perfectly locally but I'm getting a 500 Server Error on Heroku

I have a nice little rails angular app that is working great locally, but now that I am trying to deploy to heroku, I'm having some problems. Namely, when I try making a POST request (through ajax), I get back and internal server error as a response({"status":"500","error":"Internal Server Error"}). It's really driving me crazy, it seems that it's preventing the info I want to get into my database from getting there, I've tried doing the suggestions on some of the other SO threads and nothing seems to work. Doubly confusing because it works perfectly on the local host. The heroku logs for the event are here:
2014-09-23T04:30:37.497826+00:00 app[web.1]: => Booting WEBrick
2014-09-23T04:30:37.497831+00:00 app[web.1]: => Rails 4.1.4 application starting in production on http://0.0.0.0:9878
2014-09-23T04:30:37.497833+00:00 app[web.1]: => Run `rails server -h` for more startup options
2014-09-23T04:30:37.497835+00:00 app[web.1]: => Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
2014-09-23T04:30:37.497836+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-09-23T04:30:37.497838+00:00 app[web.1]: I, [2014-09-23T04:27:51.885672 #2] INFO -- : Started GET "/" for 184.73.44.87 at 2014-09-23 04:27:51 +0000
2014-09-23T04:30:37.497840+00:00 app[web.1]: I, [2014-09-23T04:27:51.988811 #2] INFO -- : Processing by PagesController#index as */*
2014-09-23T04:30:37.497841+00:00 app[web.1]: I, [2014-09-23T04:27:52.039041 #2] INFO -- : Redirected to http://hidden-lowlands-5596.herokuapp.com/users/sign_in
2014-09-23T04:30:37.497843+00:00 app[web.1]: I, [2014-09-23T04:27:52.039888 #2] INFO -- : Completed 302 Found in 51ms (ActiveRecord: 0.0ms)
2014-09-23T04:30:37.497845+00:00 app[web.1]: I, [2014-09-23T04:27:52.072805 #2] INFO -- : Started GET "/users/sign_in" for 184.73.44.87 at 2014-09-23 04:27:52 +0000
2014-09-23T04:30:37.497846+00:00 app[web.1]: I, [2014-09-23T04:27:52.077594 #2] INFO -- : Processing by Devise::SessionsController#new as */*
2014-09-23T04:30:37.497848+00:00 app[web.1]: I, [2014-09-23T04:27:52.128662 #2] INFO -- : Rendered devise/sessions/new.html.erb within layouts/application (14.9ms)
2014-09-23T04:30:37.497849+00:00 app[web.1]: I, [2014-09-23T04:27:52.180470 #2] INFO -- : Completed 200 OK in 103ms (Views: 70.2ms | ActiveRecord: 13.0ms)
2014-09-23T04:30:37.497851+00:00 app[web.1]: I, [2014-09-23T04:29:23.691686 #2] INFO -- : Started GET "/" for 24.6.253.209 at 2014-09-23 04:29:23 +0000
2014-09-23T04:30:37.497852+00:00 app[web.1]: I, [2014-09-23T04:29:23.695622 #2] INFO -- : Processing by PagesController#index as HTML
2014-09-23T04:30:37.497854+00:00 app[web.1]: D, [2014-09-23T04:29:23.701573 #2] DEBUG -- : User Load (2.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2014-09-23T04:30:37.497855+00:00 app[web.1]: I, [2014-09-23T04:29:23.706305 #2] INFO -- : Rendered pages/index.html within layouts/application (1.3ms)
2014-09-23T04:30:37.497857+00:00 app[web.1]: I, [2014-09-23T04:29:23.707351 #2] INFO -- : Completed 200 OK in 12ms (Views: 5.0ms | ActiveRecord: 2.4ms)
2014-09-23T04:30:37.497858+00:00 app[web.1]: I, [2014-09-23T04:29:25.125810 #2] INFO -- : Started GET "/articles" for 24.6.253.209 at 2014-09-23 04:29:25 +0000
2014-09-23T04:30:37.497860+00:00 app[web.1]: I, [2014-09-23T04:29:25.130961 #2] INFO -- : Processing by ArticlesController#index as JSON
2014-09-23T04:30:37.497863+00:00 app[web.1]: D, [2014-09-23T04:29:25.133835 #2] DEBUG -- : User Load (1.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2014-09-23T04:30:37.497864+00:00 app[web.1]: D, [2014-09-23T04:29:25.159063 #2] DEBUG -- : Feed Load (1.8ms) SELECT "feeds".* FROM "feeds" INNER JOIN "subscriptions" ON "feeds"."id" = "subscriptions"."feed_id" WHERE "subscriptions"."user_id" = $1 [["user_id", 1]]
2014-09-23T04:30:37.523076+00:00 heroku[router]: at=info method=GET path="/feeds" host=hidden-lowlands-5596.herokuapp.com request_id=f4e81159-eb5a-4115-9f35-3f666527d781 fwd="24.6.253.209" dyno=web.1 connect=1ms service=35ms status=304 bytes=1028
2014-09-23T04:30:37.497865+00:00 app[web.1]: D, [2014-09-23T04:29:25.179293 #2] DEBUG -- : Article Load (1.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 10]]
2014-09-23T04:30:37.497867+00:00 app[web.1]: D, [2014-09-23T04:29:25.184538 #2] DEBUG -- : Article Load (4.7ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 11]]
2014-09-23T04:30:37.497869+00:00 app[web.1]: D, [2014-09-23T04:29:25.186052 #2] DEBUG -- : Article Load (1.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 12]]
2014-09-23T04:30:37.497878+00:00 app[web.1]: D, [2014-09-23T04:29:25.187533 #2] DEBUG -- : Article Load (1.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 13]]
2014-09-23T04:30:37.497879+00:00 app[web.1]: D, [2014-09-23T04:29:25.188925 #2] DEBUG -- : Article Load (1.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 14]]
2014-09-23T04:30:37.497881+00:00 app[web.1]: D, [2014-09-23T04:29:25.190294 #2] DEBUG -- : Article Load (1.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 15]]
2014-09-23T04:30:37.497882+00:00 app[web.1]: D, [2014-09-23T04:29:25.192010 #2] DEBUG -- : Article Load (1.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 16]]
2014-09-23T04:30:37.497884+00:00 app[web.1]: D, [2014-09-23T04:29:25.193307 #2] DEBUG -- : Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 17]]
2014-09-23T04:30:37.497885+00:00 app[web.1]: D, [2014-09-23T04:29:25.194673 #2] DEBUG -- : Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 18]]
2014-09-23T04:30:37.497891+00:00 app[web.1]: D, [2014-09-23T04:29:25.196031 #2] DEBUG -- : Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 19]]
2014-09-23T04:30:37.497892+00:00 app[web.1]: D, [2014-09-23T04:29:25.199035 #2] DEBUG -- : Article Load (2.5ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 20]]
2014-09-23T04:30:37.497894+00:00 app[web.1]: I, [2014-09-23T04:29:25.199882 #2] INFO -- : Completed 200 OK in 69ms (Views: 0.3ms | ActiveRecord: 28.5ms)
2014-09-23T04:30:37.497895+00:00 app[web.1]: I, [2014-09-23T04:30:09.983278 #2] INFO -- : Started GET "/" for 24.6.253.209 at 2014-09-23 04:30:09 +0000
2014-09-23T04:30:37.497897+00:00 app[web.1]: I, [2014-09-23T04:30:09.987649 #2] INFO -- : Processing by PagesController#index as HTML
2014-09-23T04:30:37.497898+00:00 app[web.1]: D, [2014-09-23T04:30:09.990690 #2] DEBUG -- : User Load (1.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2014-09-23T04:30:37.497900+00:00 app[web.1]: I, [2014-09-23T04:30:09.993971 #2] INFO -- : Rendered pages/index.html within layouts/application (0.5ms)
2014-09-23T04:30:37.497901+00:00 app[web.1]: I, [2014-09-23T04:30:09.994855 #2] INFO -- : Completed 200 OK in 7ms (Views: 3.5ms | ActiveRecord: 1.3ms)
2014-09-23T04:30:37.497902+00:00 app[web.1]: I, [2014-09-23T04:30:10.918573 #2] INFO -- : Started GET "/articles" for 24.6.253.209 at 2014-09-23 04:30:10 +0000
2014-09-23T04:30:37.497904+00:00 app[web.1]: I, [2014-09-23T04:30:10.922422 #2] INFO -- : Processing by ArticlesController#index as JSON
2014-09-23T04:30:37.497905+00:00 app[web.1]: D, [2014-09-23T04:30:10.925552 #2] DEBUG -- : User Load (1.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2014-09-23T04:30:37.497907+00:00 app[web.1]: D, [2014-09-23T04:30:10.929624 #2] DEBUG -- : Feed Load (1.5ms) SELECT "feeds".* FROM "feeds" INNER JOIN "subscriptions" ON "feeds"."id" = "subscriptions"."feed_id" WHERE "subscriptions"."user_id" = $1 [["user_id", 1]]
2014-09-23T04:30:37.497909+00:00 app[web.1]: D, [2014-09-23T04:30:10.936177 #2] DEBUG -- : Article Load (1.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 10]]
2014-09-23T04:30:37.497910+00:00 app[web.1]: D, [2014-09-23T04:30:10.937606 #2] DEBUG -- : Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 11]]
2014-09-23T04:30:37.497912+00:00 app[web.1]: D, [2014-09-23T04:30:10.939658 #2] DEBUG -- : Article Load (1.5ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 12]]
2014-09-23T04:30:37.497913+00:00 app[web.1]: D, [2014-09-23T04:30:10.941542 #2] DEBUG -- : Article Load (1.5ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 13]]
2014-09-23T04:30:37.497932+00:00 app[web.1]: D, [2014-09-23T04:30:10.943625 #2] DEBUG -- : Article Load (1.6ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 14]]
2014-09-23T04:30:37.497933+00:00 app[web.1]: D, [2014-09-23T04:30:10.944958 #2] DEBUG -- : Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 15]]
2014-09-23T04:30:37.497935+00:00 app[web.1]: D, [2014-09-23T04:30:10.946202 #2] DEBUG -- : Article Load (0.8ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 16]]
2014-09-23T04:30:37.497936+00:00 app[web.1]: D, [2014-09-23T04:30:10.947584 #2] DEBUG -- : Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 17]]
2014-09-23T04:30:37.497938+00:00 app[web.1]: D, [2014-09-23T04:30:10.949194 #2] DEBUG -- : Article Load (1.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 18]]
2014-09-23T04:30:37.497940+00:00 app[web.1]: D, [2014-09-23T04:30:10.950493 #2] DEBUG -- : Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 19]]
2014-09-23T04:30:37.497941+00:00 app[web.1]: D, [2014-09-23T04:30:10.951773 #2] DEBUG -- : Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 20]]
2014-09-23T04:30:37.497943+00:00 app[web.1]: I, [2014-09-23T04:30:10.952334 #2] INFO -- : Completed 200 OK in 30ms (Views: 0.2ms | ActiveRecord: 15.1ms)
2014-09-23T04:30:37.497944+00:00 app[web.1]: I, [2014-09-23T04:30:31.985603 #2] INFO -- : Started POST "/feeds/search" for 24.6.253.209 at 2014-09-23 04:30:31 +0000
2014-09-23T04:30:37.497946+00:00 app[web.1]: I, [2014-09-23T04:30:31.993881 #2] INFO -- : Processing by FeedsController#search as JSON
2014-09-23T04:30:37.497947+00:00 app[web.1]: I, [2014-09-23T04:30:31.993977 #2] INFO -- : Parameters: {"url"=>"q", "feed"=>{"url"=>"q"}}
2014-09-23T04:30:37.497952+00:00 app[web.1]: I, [2014-09-23T04:30:32.186407 #2] INFO -- : Completed 200 OK in 192ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2014-09-23T04:30:37.497954+00:00 app[web.1]: I, [2014-09-23T04:30:37.487812 #2] INFO -- : Started GET "/feeds" for 24.6.253.209 at 2014-09-23 04:30:37 +0000
2014-09-23T04:30:37.497955+00:00 app[web.1]: I, [2014-09-23T04:30:37.497710 #2] INFO -- : Processing by FeedsController#index as JSON
2014-09-23T04:30:38.601702+00:00 app[web.1]: D, [2014-09-23T04:30:37.508654 #2] DEBUG -- : User Load (1.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2014-09-23T04:30:38.601707+00:00 app[web.1]: D, [2014-09-23T04:30:37.512314 #2] DEBUG -- : Feed Load (1.5ms) SELECT "feeds".* FROM "feeds" INNER JOIN "subscriptions" ON "feeds"."id" = "subscriptions"."feed_id" WHERE "subscriptions"."user_id" = $1 [["user_id", 1]]
2014-09-23T04:30:38.601709+00:00 app[web.1]: I, [2014-09-23T04:30:37.517631 #2] INFO -- : Completed 200 OK in 20ms (Views: 6.1ms | ActiveRecord: 2.9ms)
2014-09-23T04:30:38.601711+00:00 app[web.1]: I, [2014-09-23T04:30:37.779048 #2] INFO -- : Started POST "/feeds/create" for 24.6.253.209 at 2014-09-23 04:30:37 +0000
2014-09-23T04:30:38.601713+00:00 app[web.1]: I, [2014-09-23T04:30:37.802768 #2] INFO -- : Processing by FeedsController#create as JSON
2014-09-23T04:30:38.601715+00:00 app[web.1]: I, [2014-09-23T04:30:37.802879 #2] INFO -- : Parameters: {"url"=>"feed/http://www.questionablecontent.net/QCRSS.xml", "feed"=>{"url"=>"feed/http://www.questionablecontent.net/QCRSS.xml"}}
2014-09-23T04:30:38.601717+00:00 app[web.1]: D, [2014-09-23T04:30:37.977191 #2] DEBUG -- : Feed Load (8.1ms) SELECT "feeds".* FROM "feeds" WHERE "feeds"."feedly_feed_id" IS NULL LIMIT 1
2014-09-23T04:30:38.601719+00:00 app[web.1]: D, [2014-09-23T04:30:37.981727 #2] DEBUG -- : (2.8ms) BEGIN
2014-09-23T04:30:38.601721+00:00 app[web.1]: D, [2014-09-23T04:30:37.994355 #2] DEBUG -- : Feed Exists (9.1ms) SELECT 1 AS one FROM "feeds" WHERE "feeds"."feedly_feed_id" = 'feed/http://www.questionablecontent.net/QCRSS.xml' LIMIT 1
2014-09-23T04:30:38.601723+00:00 app[web.1]: D, [2014-09-23T04:30:38.006709 #2] DEBUG -- : SQL (1.7ms) INSERT INTO "feeds" ("created_at", "description", "feedly_feed_id", "name", "num_subscribers", "topics", "updated_at", "url") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", "2014-09-23 04:30:37.994655"], ["description", "Deathmøle Jacques' head takes up the bottom half of the panel, with his words taking up the top half. He is not concerned about the life of his friend."], ["feedly_feed_id", "feed/http://www.questionablecontent.net/QCRSS.xml"], ["name", "QC RSS"], ["num_subscribers", 50874], ["topics", "comics,webcomics,web comics,fun,humor"], ["updated_at", "2014-09-23 04:30:37.994655"], ["url", "http://www.questionablecontent.net"]]
2014-09-23T04:30:38.601741+00:00 app[web.1]: D, [2014-09-23T04:30:38.011917 #2] DEBUG -- : (4.7ms) COMMIT
2014-09-23T04:30:38.601743+00:00 app[web.1]: D, [2014-09-23T04:30:38.016273 #2] DEBUG -- : User Load (3.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2014-09-23T04:30:38.601744+00:00 app[web.1]: D, [2014-09-23T04:30:38.019696 #2] DEBUG -- : (1.9ms) BEGIN
2014-09-23T04:30:38.601746+00:00 app[web.1]: D, [2014-09-23T04:30:38.083515 #2] DEBUG -- : SQL (2.8ms) INSERT INTO "subscriptions" ("created_at", "feed_id", "updated_at", "user_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-09-23 04:30:38.049168"], ["feed_id", 21], ["updated_at", "2014-09-23 04:30:38.049168"], ["user_id", 1]]
2014-09-23T04:30:38.601747+00:00 app[web.1]: D, [2014-09-23T04:30:38.093502 #2] DEBUG -- : (7.6ms) COMMIT
2014-09-23T04:30:38.601749+00:00 app[web.1]: D, [2014-09-23T04:30:38.396551 #2] DEBUG -- : Feed Load (9.5ms) SELECT "feeds".* FROM "feeds" WHERE "feeds"."feedly_feed_id" = 'feed/http://www.questionablecontent.net/QCRSS.xml' LIMIT 1
2014-09-23T04:30:38.601751+00:00 app[web.1]: #<Article id: nil, feed_id: nil, canonical_url: nil, site_url: nil, visual_url: nil, visual_height: nil, visual_width: nil, author: nil, title: nil, keywords: nil, summary: nil, feedly_id: nil, published: nil, fb_share_count: nil, fb_like_count: nil, fb_comment_count: nil, twitter_count: nil, reddit_score: nil, reddit_comment_count: nil, created_at: nil, updated_at: nil, calculated_rank: nil>
2014-09-23T04:30:38.773050+00:00 heroku[router]: at=info method=POST path="/feeds/create" host=hidden-lowlands-5596.herokuapp.com request_id=9c3683ee-dabc-4e34-bfb0-c309dc547596 fwd="24.6.253.209" dyno=web.1 connect=289ms service=1018ms status=500 bytes=330
I'm really stumped on this one, any help would be greatly appreciated. Thanks :)

Resources