Skip to content

Instantly share code, notes, and snippets.

@frankie-loves-jesus
frankie-loves-jesus / 1 - Test.md
Last active August 29, 2015 14:07
Forem with PgSearch + Google-like stats
Started GET "/" for ::ffff:80.203.58.233 at 2014-10-17 19:31:58 +0000
ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
Processing by Forem::ForumsController#index as HTML
Forem::Category Load (0.7ms) SELECT "forem_categories".* FROM "forem_categories"
Forem::Forum Load (0.3ms) SELECT "forem_forums".* FROM "forem_forums" WHERE "forem_forums"."category_id" = $1 ORDER BY "forem_forums"."name" ASC [["category_id", 1]]
Forem::Category Load (0.2ms) SELECT "forem_categories".* FROM "forem_categories" WHERE "forem_categories"."id" = $1 LIMIT 1 [["id", 1]]
Forem::Post Load (0.3ms) SELECT "forem_posts".* FROM "forem_posts" INNER JOIN "forem_topics" ON "forem_posts"."topic_id" = "forem_topics"."id" WHERE "forem_topics"."forum_id" = $1 AND "forem_posts"."state" = 'approved' ORDER BY forem_posts.created_at DESC LIMIT 1 [["forum_id", 1]]
Forem::Topic L
Script started on Fri Oct 17 19:05:57 2014
# rake db:create
PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
: CREATE DATABASE "forem" ENCODING = 'utf8'
/var/lib/gems/1.9.1/gems/activerecord-4.1.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `async_exec'
/var/lib/gems/1.9.1/gems/activerecord-4.1.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute'
/var/lib/gems/1.9.1/gems/activerecord-4.1.2/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'
/var/lib/gems/1.9.1/gems/activesupport-4.1.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/lib/gems/1.9.1/gems/activerecord-4.1.2/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'
@frankie-loves-jesus
frankie-loves-jesus / 1 - Test.md
Last active August 29, 2015 14:07
Forem with PgSearch + Google-like stats
Started GET "/" for ::ffff:80.203.58.233 at 2014-10-17 17:48:59 +0000
ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
Processing by Forem::ForumsController#index as HTML
Forem::Category Load (0.3ms) SELECT "forem_categories".* FROM "forem_categories"
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
Forem::Forum Load (0.3ms) SELECT "forem_forums".* FROM "forem_forums" WHERE "forem_forums"."category_id" = ? ORDER BY "forem_forums"."name" ASC [["category_id", 1]]
Forem::Category Load (0.3ms) SELECT "forem_categories".* FROM "forem_categories" WHERE "forem_categories"."id" = ? LIMIT 1 [["id", 1]]
Forem::Post Load (0.5ms) SELECT "forem_posts".* FROM "forem_posts" INNER JOIN "forem_topics" ON "forem_posts"."topic_id" = "forem_topics"."id" WHERE "forem_topics"."forum_id" = ? ORDER B
Started GET "/" for ::ffff:80.203.58.233 at 2014-10-17 17:29:33 +0000
ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
Processing by Forem::ForumsController#index as HTML
Forem::Category Load (0.3ms) SELECT "forem_categories".* FROM "forem_categories"
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
Forem::Forum Load (0.3ms) SELECT "forem_forums".* FROM "forem_forums" WHERE "forem_forums"."category_id" = ? ORDER BY "forem_forums"."name" ASC [["category_id", 1]]
Forem::Category Load (0.2ms) SELECT "forem_categories".* FROM "forem_categories" WHERE "forem_categories"."id" = ? LIMIT 1 [["id", 1]]
Forem::Post Load (0.4ms) SELECT "forem_posts".* FROM "forem_posts" INNER JOIN "forem_topics" ON "forem_posts"."topic_id" = "forem_topics"."id" WHERE "forem_topics"."forum_id" = ? ORDER B
Started GET "/" for ::ffff:80.203.58.233 at 2014-10-17 17:29:33 +0000
ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
Processing by Forem::ForumsController#index as HTML
Forem::Category Load (0.3ms) SELECT "forem_categories".* FROM "forem_categories"
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
Forem::Forum Load (0.3ms) SELECT "forem_forums".* FROM "forem_forums" WHERE "forem_forums"."category_id" = ? ORDER BY "forem_forums"."name" ASC [["category_id", 1]]
Forem::Category Load (0.2ms) SELECT "forem_categories".* FROM "forem_categories" WHERE "forem_categories"."id" = ? LIMIT 1 [["id", 1]]
Forem::Post Load (0.4ms) SELECT "forem_posts".* FROM "forem_posts" INNER JOIN "forem_topics" ON "forem_posts"."topic_id" = "forem_topics"."id" WHERE "forem_topics"."forum_id" = ? ORDER B
Started GET "/" for ::ffff:80.203.58.233 at 2014-10-17 17:03:27 +0000
ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
Processing by Forem::ForumsController#index as HTML
Forem::Category Load (0.3ms) SELECT "forem_categories".* FROM "forem_categories"
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
Forem::Forum Load (0.3ms) SELECT "forem_forums".* FROM "forem_forums" WHERE "forem_forums"."category_id" = ? ORDER BY "forem_forums"."name" ASC [["category_id", 1]]
Forem::Category Load (0.3ms) SELECT "forem_categories".* FROM "forem_categories" WHERE "forem_categories"."id" = ? LIMIT 1 [["id", 1]]
Forem::Post Load (0.4ms) SELECT "forem_posts".* FROM "forem_posts" INNER JOIN "forem_topics" ON "forem_posts"."topic_id" = "forem_topics"."id" WHERE "forem_topics"."forum_id" = ? ORDER B
@frankie-loves-jesus
frankie-loves-jesus / 1 - Test.md
Last active August 29, 2015 14:07
Forem with Paperclip

i18n-js combined with rails-i18n causes mass-export of all available languages into JS file

Gemfile

gem 'rails-i18n'
gem 'i18n-js'

config/i18n-js.yml