Skip to content

Instantly share code, notes, and snippets.

@dennyscode
dennyscode / index.html
Created January 12, 2019 20:52
CF Task 2.12
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>DennySander FirstPage</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
@dennyscode
dennyscode / test.html
Created January 12, 2019 11:55
Col-Problem
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>DennySander FirstPage</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
@dennyscode
dennyscode / Error.txt
Created January 11, 2019 15:09
Mailer Problem
2019-01-11T14:49:39.160103+00:00 heroku[router]: at=info method=POST path="/simple_pages/thank_you" host=enigmatic-meadow-72765.herokuapp.com request_id=252c3694-5455-41e9-9ddd-4c33873972b7 fwd="95.91.246.143" dyno=web.1 connect=0ms service=130ms status=500 bytes=1827 protocol=https
2019-01-11T14:58:15.841456+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=enigmatic-meadow-72765.herokuapp.com request_id=2f97d1de-7a3b-4568-acfe-2751fd6ef07b fwd="2a02:8109:83c0:6854:d9d:4d9f:6c3a:12fa,66.249.93.40" dyno=web.1 connect=0ms service=9ms status=200 bytes=143 protocol=https
2019-01-11T15:01:18.694626+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2019-01-11T15:01:18.718596+00:00 app[web.1]: === puma shutdown: 2019-01-11 15:01:18 +0000 ===
2019-01-11T15:01:18.718669+00:00 app[web.1]: - Goodbye!
2019-01-11T15:01:18.718843+00:00 app[web.1]: Exiting
2019-01-11T15:01:18.673111+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2019-01-11T15:01:18.806769+00:00 heroku[web.1]:
@dennyscode
dennyscode / error.txt
Created January 10, 2019 16:08
Commenting Problem
Started POST "/products/2/comments" for 127.0.0.1 at 2019-01-10 17:08:00 +0100
Processing by CommentsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"jZQI8vmXuPU5qUhTlsZNMOIrmwVFa9XBe3y3KwiilhZHTlXnC3sq9VC/dSBUeDcZHcnzfLgWzRlo63wY0awQmg==", "comment"=>{"commenter"=>"Denny", "body"=>"CommentForTest!"}, "commit"=>"Create Comment", "product_id"=>"2"}
Product Load (0.8ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
↳ app/controllers/comments_controller.rb:4
(0.1ms) begin transaction
↳ app/controllers/comments_controller.rb:5
(0.1ms) rollback transaction
↳ app/controllers/comments_controller.rb:5
Redirected to http://localhost:3000/products/2
@dennyscode
dennyscode / error.txt
Created January 10, 2019 16:02
Heroku Error when products#show --> /show/id
2019-01-10T15:57:24.891022+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 44019 -e production`
2019-01-10T15:57:31.676014+00:00 heroku[router]: at=info method=GET path="/products/2" host=enigmatic-meadow-72765.herokuapp.com request_id=fb46bd6f-b561-4dfe-8dbc-5464f8565421 fwd="95.91.246.143" dyno=web.1 connect=1ms service=190ms status=500 bytes=1827 protocol=https
2019-01-10T15:57:34.406231+00:00 heroku[router]: at=info method=GET path="/assets/application-cf66d1754d97aea7dae399f5f79f6da06e2c365c42c82813854f9d61c8fcfe50.css" host=enigmatic-meadow-72765.herokuapp.com request_id=b6ec6c5d-0c4c-4062-8d1a-5b490ddd5abc fwd="95.91.246.143" dyno=web.1 connect=1ms service=2ms status=304 bytes=48 protocol=https
2019-01-10T15:57:34.223033+00:00 app[web.1]: /app/app/views/products/index.html.erb:17: warning: key :class is duplicated and overwritten on line 17
2019-01-10T15:57:38.766526+00:00 heroku[router]: at=info method=GET path="/products/2" host=enigmatic-meadow-72765.herokuapp.com request_id=
@dennyscode
dennyscode / error_showed_in_bash.txt
Created January 9, 2019 20:46
Upcoming Error when Running "git push heroku master"
/careerfoundry/5/webshop/webshop$ git push heroku master
Counting objects: 24, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (24/24), done.
Writing objects: 100% (24/24), 2.80 KiB | 143.00 KiB/s, done.
Total 24 (delta 17), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
@dennyscode
dennyscode / Error.txt
Last active January 9, 2019 08:59
Heroku ActivityFeed - BuildLog
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.5.3
-----> Installing dependencies using bundler 1.15.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.17.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Using rake 12.3.2
@dennyscode
dennyscode / Gemfile
Last active January 8, 2019 18:45
Problem pushing to heroku
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.5.3'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.2'
# Use sqlite3 as the database for Active Record
# deactivated !
#gem 'sqlite3'
@dennyscode
dennyscode / orders_controller.rb
Last active January 7, 2019 12:26
CF Task 5.1 Button - if else
class OrdersController < ApplicationController
def index
@orders = Order.includes(:product).all
end
def show
begin
@sum_orders = Order.all.length
@order = Order.find(params[:id])
# rescue ActiveRecord::RecordNotFound => e
@dennyscode
dennyscode / heroku_error_migrate.txt
Created December 17, 2018 15:00
Heroku error heroku run rails db:migrate
$ heroku run rails db:migrate
Running rails db:migrate on ⬢ guarded-inlet-43243... up, run.2054 (Free)
D, [2018-12-17T14:59:13.578407 #4] DEBUG -- : (6.9ms) SELECT pg_try_advisory_lock(1873420161328542225)
D, [2018-12-17T14:59:13.616154 #4] DEBUG -- : (2.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
I, [2018-12-17T14:59:13.618590 #4] INFO -- : Migrating to RenameColorsInProducts (20181214132445)
D, [2018-12-17T14:59:13.623164 #4] DEBUG -- : (1.1ms) BEGIN
== 20181214132445 RenameColorsInProducts: migrating ===========================
-- rename_column(:products, :color, :colour)
D, [2018-12-17T14:59:13.626428 #4] DEBUG -- : (2.7ms) ALTER TABLE "products" RENAME COLUMN "color" TO "colour"
D, [2018-12-17T14:59:13.627749 #4] DEBUG -- : (1.0ms) ROLLBACK