SystemStackError in Forem::TopicsController#create
stack level too deep
actionpack (4.1.2) lib/action_dispatch/middleware/reloader.rb:79
This file contains 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 characters
" Vera-based font family | |
" https://dejavu-fonts.github.io/ | |
Guifont DejaVu Sans Mono:h14 | |
" Start maximized | |
call GuiWindowMaximized(1) |
This file contains 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 characters
class Photo < ActiveRecord::Base | |
ATTACHMENT_STYLES = lambda do |attachment| | |
# http://stackoverflow.com/a/23513608/69926 | |
# https://github.com/joehilton/hpvideos/blob/master/app/models/attachment.rb | |
# if is_animated_gif?(attachment) | |
if attachment.instance.is_animated_gif? | |
{medium: {format: "flv"}, thumbnail: {format: "png"}} | |
else |
paperclip-ffmpeg autoconvert animated GIF to MP4
Go to Default
and then the latest post. Alternatively log in with email [email protected]
and password admin1234
and upload an animated GIF yourself.
photo.rb
Live demo app: http://runnable.com/VGJozZBtZw5RAg7d/forem-with-desc-replies
views/forem/topics/show.html.erb
<%= render partial: "forem/posts/post", collection: topic.desc_posts, locals: { topic: @topic } %>
Run /etc/init.d/postgresql start
before hitting the Run
button.
app/views/forem/forums/search.html.erb
This file contains 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 characters
Started GET "/" for ::ffff:80.203.58.233 at 2014-10-17 19:31:58 +0000 | |
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m | |
Processing by Forem::ForumsController#index as HTML | |
[1m[35mForem::Category Load (0.7ms)[0m SELECT "forem_categories".* FROM "forem_categories" | |
[1m[36mForem::Forum Load (0.3ms)[0m [1mSELECT "forem_forums".* FROM "forem_forums" WHERE "forem_forums"."category_id" = $1 ORDER BY "forem_forums"."name" ASC[0m [["category_id", 1]] | |
[1m[35mForem::Category Load (0.2ms)[0m SELECT "forem_categories".* FROM "forem_categories" WHERE "forem_categories"."id" = $1 LIMIT 1 [["id", 1]] | |
[1m[36mForem::Post Load (0.3ms)[0m [1mSELECT "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[0m [["forum_id", 1]] | |
[1m[35mForem::Topic L |
This file contains 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 characters
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' |
Run /etc/init.d/postgresql start
before hitting the Run
button.
app/decorators/models/forem/topic_decorator.rb
Forem::Topic.class_eval do
include PgSearch
This file contains 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 characters
Started GET "/" for ::ffff:80.203.58.233 at 2014-10-17 17:48:59 +0000 | |
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m | |
Processing by Forem::ForumsController#index as HTML | |
[1m[35mForem::Category Load (0.3ms)[0m SELECT "forem_categories".* FROM "forem_categories" | |
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m | |
[1m[35mForem::Forum Load (0.3ms)[0m SELECT "forem_forums".* FROM "forem_forums" WHERE "forem_forums"."category_id" = ? ORDER BY "forem_forums"."name" ASC [["category_id", 1]] | |
[1m[36mForem::Category Load (0.3ms)[0m [1mSELECT "forem_categories".* FROM "forem_categories" WHERE "forem_categories"."id" = ? LIMIT 1[0m [["id", 1]] | |
[1m[35mForem::Post Load (0.5ms)[0m 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 |
NewerOlder