Skip to content

Conversation

@moio
Copy link
Member

@moio moio commented Dec 3, 2025

Emojis (e.g., 😱) in comments or project descriptions cause HTTP 500. MySQL's utf8 charset only supports 3-byte UTF-8; emojis require 4-byte utf8mb4.

Fixes #585.

This was made with Copilot agents as part of experiments for my HackWeek project.

I tested it manually and it works in my environment, as far as I can tell:

Screenshot 2025-12-03 at 15 52 22

docker-compose exec hackweek bundle exec rspec apparently fails mid way for reasons I don’t understand. In logs I see:

hackweek-hackweek-1  | 15:13:49 system   | sending SIGTERM to all processes                                            │All examples were filtered out; ignoring {focus: true}

I hope this helps. Feedback welcome.

@danidoni
Copy link
Contributor

Hey, thanks for contributing!

docker-compose exec hackweek bundle exec rspec apparently fails mid way for reasons I don’t understand. In logs I

Is your docker compose up? Try with docker compose run hackweek bundle exec rspec instead. Remember exec only works for containers that are running...

@danidoni
Copy link
Contributor

Also, you need to run the migrations locally and upload the modified schema file

@moio
Copy link
Member Author

moio commented Dec 12, 2025

thanks @danidoni

So first of all I am trying to run rspec tests on clean master, without the changes here.

App is up, but I see my emoji projects, so resetting the database.

IIUC the right command is

docker compose run hackweek bundle exec rake db:drop db:create db:migrate

This fails with:

-- add_attachment(:projects, :avatar)
rake aborted!
StandardError: An error has occurred, all later migrations canceled: (StandardError)

/hackweek/db/migrate/20140910105916_add_avatar_columns_to_projects.rb:3:in 'AddAvatarColumnsToProjects.up'

Caused by:
NoMethodError: undefined method 'add_attachment' for an instance of AddAvatarColumnsToProjects (NoMethodError)
Did you mean?  add_column
/hackweek/vendor/bundle/ruby/3.4.0/gems/activerecord-7.2.3/lib/active_record/migration.rb:1058:in 'block in ActiveRecord::Migration#method_missing'

What am I doing wrong?

@danidoni
Copy link
Contributor

danidoni commented Dec 12, 2025 via email

@moio
Copy link
Member Author

moio commented Dec 12, 2025

Right, thanks.

Checking out from master branch, then running docker-compose run --rm hackweek bundle exec rake dev:bootstrap, then running docker-compose up --build and finally docker compose run hackweek bundle exec rspec from another console results in:

140 examples, 16 failures

Failed examples:

rspec ./spec/features/collaboration_spec.rb:41 # Collaboration User dislikes a project
rspec ./spec/features/collaboration_spec.rb:16 # Collaboration User leaves a project
rspec ./spec/features/collaboration_spec.rb:28 # Collaboration User likes a project
rspec ./spec/features/collaboration_spec.rb:4 # Collaboration User joins a project
rspec ./spec/features/collaboration_spec.rb:55 # Collaboration User likes a project multiple times
rspec ./spec/features/project_management_spec.rb:27 # Project management User edits a project
rspec ./spec/features/project_management_spec.rb:75 # Project management User restarts a project
rspec ./spec/features/project_management_spec.rb:55 # Project management User archives an idea
rspec ./spec/features/project_management_spec.rb:94 # Project management more than one project having same tags
rspec ./spec/features/project_management_spec.rb:10 # Project management User creates a new project
rspec ./spec/features/project_management_spec.rb:85 # Project management User uses markdown preview button during editing
rspec ./spec/features/project_management_spec.rb:65 # Project management User finishes a project
rspec ./spec/features/comment_spec.rb:24 # Comment create
rspec ./spec/features/comment_spec.rb:60 # Comment update
rspec ./spec/features/comment_spec.rb:13 # Comment markdown preview
rspec ./spec/features/comment_spec.rb:40 # Comment reply to a comment

Checking out this branch, re-running docker-compose run --rm hackweek bundle exec rake dev:bootstrap and then docker-compose up --build, and finally docker compose run hackweek bundle exec rspec in a different console leads me to the exact same 16 failures (the 3 added examples in this PR pass).

Is it safe to assume the problem lies elsewhere?

Is there anything else I should do for this PR to be mergeable?

Copilot AI and others added 2 commits December 12, 2025 15:31
Co-authored-by: moio <250541+moio@users.noreply.github.com>
Signed-off-by: Silvio Moioli <silvio@moioli.net>
@danidoni
Copy link
Contributor

I don't know what to tell you... I started from a fresh start, on master, and I don't have any error... Did you try removing all containers from that project and rebuild again from scratch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No Emoji Support! How dare you....

2 participants