Last active
October 19, 2018 03:34
-
-
Save cdrani/a55613ec735e2bc98b3b884758a6d23f to your computer and use it in GitHub Desktop.
Revisions
-
__mifflin__ revised this gist
Oct 19, 2018 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,18 @@ Error: RecordNotFound Couldn't find User with 'id'=" Fix: as outlined on [so](https://stackoverflow.com/a/44704987) ```ruby def current_user @current_user ||= User.find_by(id: session[:user_id]) if session[:user_id] end ``` --- Error: Tables not found in heroku error, such as in the case `ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "events" does not exist` Fix: as outlined on [so](https://stackoverflow.com/a/37372219) In Heroku console: `rake run db:schema:load` -
__mifflin__ created this gist
Oct 19, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ Error: RecordNotFound Couldn't find User with 'id'=" Fix: as outlined on [so](https://stackoverflow.com/a/44704987) ```ruby def current_user @current_user ||= User.find_by(id: session[:user_id]) if session[:user_id] end ``` --- Error: Tables not found in heroku error, such as in the case `ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "events" does not exist` Fix: as outlined on [so](https://stackoverflow.com/a/37372219) In Heroku console: `rake run db:schema:load`