Skip to content

Instantly share code, notes, and snippets.

@bld2104
bld2104 / RAILS_ENV=production bin-rake assets:precompile
Last active March 10, 2016 17:35
RAILS_ENV=production bin-rake assets:precompile
bld2104:~/workspace/sfunique2 (master) $ RAILS_ENV=production bin/rake assets:precompile
DEPRECATION WARNING: The configuration option `config.serve_static_assets` has been renamed to `config.serve_static_files` to clarify its role (it merely enables serving everything in the `public` folder and is unrelated to the asset pipeline). The `serve_static_assets` alias will be removed in Rails 5.0. Please migrate your configuration files accordingly. (called from block in <top (required)> at /home/ubuntu/workspace/sfunique2/config/environments/production.rb:79)
[WARNING] You are not setting Devise.secret_key within your application!
You must set this in config/initializers/devise.rb. Here's an example:
Devise.secret_key = "8aec2b518ac0ac33741d4f6ca0694eda863186b58a97b18d252a3bfb133018860874699bee7218b9564b02f5f0322e6abdf4"
/usr/local/rvm/gems/ruby-2.2.1/gems/actionpack-4.2.2/lib/action_dispatch/routing/route_set.rb:555:in `add_route': Invalid route name, already in use: 'spree'
You may have defined two routes w
@bld2104
bld2104 / heroku logs states error
Created March 22, 2016 17:58
heroku logs states error
2016-03-10T22:17:59.603409+00:00 app[web.1]: Started PATCH "/shop/cart" for 100.14.176.16 at 2016-03-10 22:17:59 +0000
2016-03-10T22:17:59.606164+00:00 app[web.1]: Processing by Spree::OrdersController#update as HTML
2016-03-10T22:17:59.606267+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"ixp4G4AU6/SCWb6Pqd7t4k7wNib+2YYa2FdaE4jLE7kem5IEuQd4li9ig+nO0t5xtqNTfBriu3J+DZlWcnFPfA==", "order"=>{"line_items_attributes"=>{"0"=>{"quantity"=>"1", "id"=>"1"}, "1"=>{"quantity"=>"1", "id"=>"2"}}}, "checkout"=>""}
2016-03-10T22:17:59.610508+00:00 app[web.1]: Spree::Preference Load (2.8ms) SELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = $1 LIMIT 1 [["key", "spree/frontend_configuration/locale"]]
2016-03-10T22:17:59.614534+00:00 app[web.1]: Spree::User Load (2.2ms) SELECT "spree_users".* FROM "spree_users" WHERE "spree_users"."deleted_at" IS NULL AND "spree_users"."id" = $1 ORDER BY "spree_users"."id" ASC LIMIT 1 [["id", 1]]
2016-03-10T22:17:59.618957+0
new-host:boxplot-theme barbaradonnini$ gcloud app deploy
WARNING: Automatic app detection is currently in Beta
Deployment to Google App Engine requires an app.yaml file. This
command will run `gcloud beta app gen-config` to generate an app.yaml
file for you in the current directory (if the current directory does
not contain an App Engine service, please answer "no").
Do you want to continue (Y/n)? y
This looks like a Python app. If so, please enter the command to run
@bld2104
bld2104 / _entry_detail_base.html
Created March 13, 2018 20:53
How I reformatted the zinnia blog page. Images aren't working in production.
{% load i18n %}
{% load zinnia %}
<div class="container">
<article id="entry-{{ object.pk }}" class="hentry{% if object.featured %} featured{% endif %}" itemscope itemtype="http://schema.org/Article">
{% block entry-header %}
<header class="entry-header">
{% block entry-title %}
<h2 class="entry-title" itemprop="name">
<a href="{{ object.get_absolute_url }}" title="{{ object.title }}" rel="bookmark" itemprop="url">
###############
## This is just for trying to get the newsletter sign-up form on a new page, not the other issue I mentioned
## This is literally all I added
###############
# views.py
from newsletter.models import Newsletter
class EmbedNewsletterSubscribeView(TemplateView):
template_name = 'testnewslettersubscribe.html'
def get_context_data(self, **kwargs):
ValueError at /testnewsletter
The view stylesite.views.EmbedNewsletterSubscribeView didn't return an HttpResponse object. It returned None instead.
Request Method: GET
Request URL: http://127.0.0.1:8000/testnewsletter
Django Version: 2.0.2
Exception Type: ValueError
Exception Value:
The view stylesite.views.EmbedNewsletterSubscribeView didn't return an HttpResponse object. It returned None instead.
Exception Location: /Users/barbaradonnini/Documents/stylevenv/lib/python3.6/site-packages/django/core/handlers/base.py in _get_response, line 139
Python Executable: /Users/barbaradonnini/Documents/stylevenv/bin/python
$ brew install homebrew/apache/httpd24 --with-mpm-event
Updating Homebrew...
==> Downloading https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.3.7.leopard_64.bottle.tar.gz
######################################################################## 100.0%
==> Pouring portable-ruby-2.3.7.leopard_64.bottle.tar.gz
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Auto-updated Homebrew!
Updated 2 taps (heroku/brew and homebrew/core).
==> New Formulae