I am getting the following error in my Heroku logs when a query in my rails application is being invoked :
2019-03-19T02:16:25.782434+00:00 app[web.1]: I, [2019-03-19T02:16:25.782337 #4] INFO -- : [75c3a8ff-f6cb-4954-8f23-071bfc2671ec] Started GET "/patients?utf8=
%E2%9C%93&Full_Name=tester" for 95.45.117.131 at 2019-03-19 02:16:25 +0000
2019-03-19T02:16:25.783395+00:00 app[web.1]: I, [2019-03-19T02:16:25.783337 #4] INFO -- : [75c3a8ff-f6cb-4954-8f23-071bfc2671ec] Processing by PatientsContro
ller#index as HTML
2019-03-19T02:16:25.783570+00:00 app[web.1]: I, [2019-03-19T02:16:25.783521 #4] INFO -- : [75c3a8ff-f6cb-4954-8f23-071bfc2671ec] Parameters: {"utf8"=>"✓",
"Full_Name"=>"tester"}
2019-03-19T02:16:25.790532+00:00 app[web.1]: D, [2019-03-19T02:16:25.790467 #4] DEBUG -- : [75c3a8ff-f6cb-4954-8f23-071bfc2671ec] User Load (3.7ms) SELECT
"users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 5], ["LIMIT", 1]]
2019-03-19T02:16:25.794827+00:00 app[web.1]: D, [2019-03-19T02:16:25.794753 #4] DEBUG -- : [75c3a8ff-f6cb-4954-8f23-071bfc2671ec] (3.2ms) SELECT COUNT(*)
FROM "patients" WHERE (full_name LIKE '%tester%' AND user_id = 5)
2019-03-19T02:16:25.795077+00:00 app[web.1]: I, [2019-03-19T02:16:25.795025 #4] INFO -- : [75c3a8ff-f6cb-4954-8f23-071bfc2671ec] Completed 500 Internal Serve
r Error in 11ms (ActiveRecord: 6.9ms)
2019-03-19T02:16:25.795954+00:00 app[web.1]: F, [2019-03-19T02:16:25.795899 #4] FATAL -- : [75c3a8ff-f6cb-4954-8f23-071bfc2671ec]
2019-03-19T02:16:25.796028+00:00 app[web.1]: F, [2019-03-19T02:16:25.795980 #4] FATAL -- : [75c3a8ff-f6cb-4954-8f23-071bfc2671ec] ActiveRecord::StatementInval
id (PG::UndefinedColumn: ERROR: column "full_name" does not exist
2019-03-19T02:16:25.796030+00:00 app[web.1]: LINE 1: SELECT COUNT(*) FROM "patients" WHERE (full_name LIKE '%test...
2019-03-19T02:16:25.796032+00:00 app[web.1]: ^
2019-03-19T02:16:25.796033+00:00 app[web.1]: HINT: Perhaps you meant to reference the column "patients.Full_Name".
2019-03-19T02:16:25.796035+00:00 app[web.1]: : SELECT COUNT(*) FROM "patients" WHERE (full_name LIKE '%tester%' AND user_id = 5)):
2019-03-19T02:16:25.796102+00:00 app[web.1]: F, [2019-03-19T02:16:25.796057 #4] FATAL -- : [75c3a8ff-f6cb-4954-8f23-071bfc2671ec]
2019-03-19T02:16:25.796180+00:00 app[web.1]: F, [2019-03-19T02:16:25.796138 #4] FATAL -- : [75c3a8ff-f6cb-4954-8f23-071bfc2671ec] app/controllers/patients_con
troller.rb:15:in `index'
2019-03-19T02:16:25.796617+00:00 heroku[router]: at=info method=GET path="/patients?utf8=%E2%9C%93&Full_Name=tester" host=pure-reef-79084.herokuapp.com reques
t_id=75c3a8ff-f6cb-4954-8f23-071bfc2671ec fwd="95.45.117.131" dyno=web.1 connect=0ms service=16ms status=500 bytes=1827 protocol=https
the code being executed is this :
patients_controller.rb
#patients = Patient.where("patients.Full_Name LIKE :name AND patients.user_id = :id", {:name => "%#{params[:Full_Name]}%", :id => current_user.id})
I have narrowed it down to the fact that postgresql is case sensitive so i am assuming it does not like "Full_Name". I tried encapsulating the column name in double quotes like this :
#patients = Patient.where(""Full_Name" LIKE :name AND user_id = :id", {:name => "%#{params[:Full_Name]}%", :id => current_user.id})
however I get a SyntaxError. Anyone have any suggestions how i would amend this query so that it will fetch the column?
Solved
As per the answer below I had to put quotes around my column name like so :
#patients = Patient.where('"Full_Name" LIKE :name AND patients.user_id = :id', {:name => "%#{params[:Full_Name]}%", :id => current_user.id})
Your table was probably created with double quotes around the column name "Full_Name" so it expects that exact capitalization. All your references to this column should be exactly like that, not Full_Name or "full_name".
Either reference it properly, or rename your column to omit the double quotes:
ALTER TABLE "patients" RENAME COLUMN "Full_Name" TO full_name;
Good discussion here: http://blog.lerner.co.il/quoting-postgresql/
So i have this code in my mode
# == Schema Information
#
# Table name: users
#
# id :integer not null, primary key
# name :string
# surname :string
# user_id :integer
# count :integer default(0)
# was :boolean default(FALSE)
# qrcode :string
# created_at :datetime not null
# updated_at :datetime not null
#
class User < ApplicationRecord
validates :name, presence: true
validates :surname, presence: true
validates :user_id, presence: true
after_create :generate_qr
private
def generate_qr
ian = User.find(id)
ian.update_attribute(:qrcode, "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=" + user_id.to_s)
# update_attribute(:qrcode, "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=" + user_id.to_s)
end
end
Its work fine and generate qr code on my local host. But when i deploy on heroku i have this errors in heroku logs.
2018-06-30T14:23:37.200657+00:00 app[web.1]: I, [2018-06-30T14:23:37.200507 #4] INFO -- : [56b953ac-5a43-4b25-980d-f2bc5c53883a] Parameters: {"utf8"=>"✓", "authenticity_token"=>"mBkhE7alyyKGtS4v+tnW2Vpg6c1z0kwQfbnftqTWdSukTpre29vkqVmeuVoGR7NJzs0EoxiQv0rS+WzJ4hUSOw==", "user"=>{"name"=>"fdsfds", "surname"=>"fdsfdsfds", "user_id"=>"53454"}, "commit"=>"Create User"}
2018-06-30T14:23:37.204598+00:00 app[web.1]: D, [2018-06-30T14:23:37.204527 #4] DEBUG -- : [56b953ac-5a43-4b25-980d-f2bc5c53883a] (1.1ms) BEGIN
2018-06-30T14:23:37.207575+00:00 app[web.1]: D, [2018-06-30T14:23:37.207496 #4] DEBUG -- : [56b953ac-5a43-4b25-980d-f2bc5c53883a] User Create (1.5ms) INSERT INTO "users" ("name", "surname", "user_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "fdsfds"], ["surname", "fdsfdsfds"], ["user_id", 53454], ["created_at", "2018-06-30 14:23:37.204956"], ["updated_at", "2018-06-30 14:23:37.204956"]]
2018-06-30T14:23:37.214137+00:00 app[web.1]: D, [2018-06-30T14:23:37.214060 #4] DEBUG -- : [56b953ac-5a43-4b25-980d-f2bc5c53883a] User Load (1.3ms)
SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 7], ["LIMIT", 1]]
2018-06-30T14:23:37.215729+00:00 app[web.1]: D, [2018-06-30T14:23:37.215664 #4] DEBUG -- : [56b953ac-5a43-4b25-980d-f2bc5c53883a] (1.1ms) ROLLBACK
2018-06-30T14:23:37.224955+00:00 app[web.1]: I, [2018-06-30T14:23:37.224881 #4] INFO -- : [56b953ac-5a43-4b25-980d-f2bc5c53883a] Completed 500 Internal Server Error in 24ms (ActiveRecord: 6.1ms)
2018-06-30T14:23:37.225904+00:00 app[web.1]: F, [2018-06-30T14:23:37.225838 #4] FATAL -- : [56b953ac-5a43-4b25-980d-f2bc5c53883a]
2018-06-30T14:23:37.226043+00:00 app[web.1]: F, [2018-06-30T14:23:37.225990 #4] FATAL -- : [56b953ac-5a43-4b25-980d-f2bc5c53883a] NoMethodError (undefined method `qrcode=' for #<User:0x00000004fd1d68>):
2018-06-30T14:23:37.226091+00:00 app[web.1]: F, [2018-06-30T14:23:37.226046 #4] FATAL -- : [56b953ac-5a43-4b25-980d-f2bc5c53883a]
2018-06-30T14:23:37.226146+00:00 app[web.1]: F, [2018-06-30T14:23:37.226103 #4] FATAL -- : [56b953ac-5a43-4b25-980d-f2bc5c53883a] app/models/user.rb:25:in `generate_qr'
Someone please help. I dont know where is error. Its work fine on my localhost.
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.
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.
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 :)