Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

71%
+3 −0
#6: Post edited by user avatar Yaskur‭ · 2021-01-24T03:48:16Z (about 3 years ago)
  • I tried to install on my free GCP VM compute but when run `rails db:schema:load
  • `
  • return error:
  • ```root@instance-3:~/qpixel# rails db:schema:load
  • -- create_table("abilities", {:options=>"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", :force=>:cascade})
  • rails aborted!
  • ActiveRecord::StatementInvalid: Mysql2::Error: Unknown collation: 'utf8mb4_0900_ai_ci': CREATE TABLE `abilities` (`id` bigint NOT NULL AUTO_INCREMENT PRIMARY KEY, `community_id` bigint, `name` varchar(255), `description` text, `internal_id` varchar(255), `icon` varchar(255), `post_score_threshold` decimal(10,8), `edit_score_threshold` decimal(10,8), `flag_score_threshold` decimal(10,8), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `summary` text, INDEX `index_abilities_on_community_id` (`community_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
  • ```
  • It was worked fine on my Mac OS, what's wrong with my ubuntu?
  • Maybe I need to install/activate `utf8mb4_0900_ai_ci`, but how to do it? I cant find any resource about install it, just suggestion to change to to `utf8mb4_general_ci`
  • My software specification:
  • - Ubuntu 18.04
  • - mysql 5.7.32-0ubuntu0.18.04.1-log
  • - Ruby 2.6.6
  • - gem 3.0.3
  • - rails 5.2.4.4
  • - rbenv 1.0.0
  • I tried to install on my free GCP VM compute but when run `rails db:schema:load
  • `
  • return error:
  • ```root@instance-3:~/qpixel# rails db:schema:load
  • -- create_table("abilities", {:options=>"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", :force=>:cascade})
  • rails aborted!
  • ActiveRecord::StatementInvalid: Mysql2::Error: Unknown collation: 'utf8mb4_0900_ai_ci': CREATE TABLE `abilities` (`id` bigint NOT NULL AUTO_INCREMENT PRIMARY KEY, `community_id` bigint, `name` varchar(255), `description` text, `internal_id` varchar(255), `icon` varchar(255), `post_score_threshold` decimal(10,8), `edit_score_threshold` decimal(10,8), `flag_score_threshold` decimal(10,8), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `summary` text, INDEX `index_abilities_on_community_id` (`community_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
  • ```
  • It was worked fine on my Mac OS, what's wrong with my ubuntu?
  • Maybe I need to install/activate `utf8mb4_0900_ai_ci`, but how to do it? I cant find any resource about install it, just suggestion to change it to `utf8mb4_general_ci`
  • My software specification:
  • - Ubuntu 18.04
  • - mysql 5.7.32-0ubuntu0.18.04.1-log
  • - Ruby 2.6.6
  • - gem 3.0.3
  • - rails 5.2.4.4
  • - rbenv 1.0.0
#5: Post edited by user avatar Yaskur‭ · 2021-01-24T03:47:52Z (about 3 years ago)
  • I tried to install on my free GCP VM compute but when run `rails db:schema:load
  • `
  • return error:
  • ```root@instance-3:~/qpixel# rails db:schema:load
  • -- create_table("abilities", {:options=>"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", :force=>:cascade})
  • rails aborted!
  • ActiveRecord::StatementInvalid: Mysql2::Error: Unknown collation: 'utf8mb4_0900_ai_ci': CREATE TABLE `abilities` (`id` bigint NOT NULL AUTO_INCREMENT PRIMARY KEY, `community_id` bigint, `name` varchar(255), `description` text, `internal_id` varchar(255), `icon` varchar(255), `post_score_threshold` decimal(10,8), `edit_score_threshold` decimal(10,8), `flag_score_threshold` decimal(10,8), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `summary` text, INDEX `index_abilities_on_community_id` (`community_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
  • ```
  • It was worked fine on my Mac OS, what's wrong with my ubuntu?
  • Maybe I need to install/activate `utf8mb4_0900_ai_ci`, but how to do it? I cant find any resource about install it, just suggestion to change to `utf8mb4_general_ci`
  • My software specification:
  • - Ubuntu 18.04
  • - mysql 5.7.32-0ubuntu0.18.04.1-log
  • - Ruby 2.6.6
  • - gem 3.0.3
  • - rails 5.2.4.4
  • - rbenv 1.0.0
  • I tried to install on my free GCP VM compute but when run `rails db:schema:load
  • `
  • return error:
  • ```root@instance-3:~/qpixel# rails db:schema:load
  • -- create_table("abilities", {:options=>"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", :force=>:cascade})
  • rails aborted!
  • ActiveRecord::StatementInvalid: Mysql2::Error: Unknown collation: 'utf8mb4_0900_ai_ci': CREATE TABLE `abilities` (`id` bigint NOT NULL AUTO_INCREMENT PRIMARY KEY, `community_id` bigint, `name` varchar(255), `description` text, `internal_id` varchar(255), `icon` varchar(255), `post_score_threshold` decimal(10,8), `edit_score_threshold` decimal(10,8), `flag_score_threshold` decimal(10,8), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `summary` text, INDEX `index_abilities_on_community_id` (`community_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
  • ```
  • It was worked fine on my Mac OS, what's wrong with my ubuntu?
  • Maybe I need to install/activate `utf8mb4_0900_ai_ci`, but how to do it? I cant find any resource about install it, just suggestion to change to to `utf8mb4_general_ci`
  • My software specification:
  • - Ubuntu 18.04
  • - mysql 5.7.32-0ubuntu0.18.04.1-log
  • - Ruby 2.6.6
  • - gem 3.0.3
  • - rails 5.2.4.4
  • - rbenv 1.0.0
#4: Post edited by user avatar Yaskur‭ · 2021-01-24T03:46:43Z (about 3 years ago)
  • Mysql error when run rails db:schema:load
  • Mysql return error Unknown collation: 'utf8mb4_0900_ai_ci' when run rails db:schema:load
#3: Post edited by user avatar Yaskur‭ · 2021-01-24T03:45:00Z (about 3 years ago)
  • Mysql error when run rails r db/scripts/create_tags_path_view.rb
  • Mysql error when run rails db:schema:load
  • I tried to install on my free GCP VM compute but when run `rails r db/scripts/create_tags_path_view.rb`
  • return error:
  • > /root/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:131:in `_query': Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RECURSIVE tag_path (id, created_at, updated_at, community_id, tag_set_id, wiki_m' at line 2: create view tags_paths as (ActiveRecord::StatementInvalid)
  • WITH RECURSIVE tag_path (id, created_at, updated_at, community_id, tag_set_id, wiki_markdown,
  • wiki, excerpt, parent_id, name, path) AS
  • (
  • SELECT id, created_at, updated_at, community_id, tag_set_id, wiki_markdown,
  • wiki, excerpt, parent_id, name, name as path
  • FROM tags
  • WHERE parent_id IS NULL
  • UNION ALL
  • SELECT t.id, t.created_at, t.updated_at, t.community_id, t.tag_set_id, t.wiki_markdown,
  • t.wiki, t.excerpt, t.parent_id, t.name, concat(tp.path, ' > ', t.name) as path
  • FROM tag_path AS tp JOIN tags AS t ON tp.id = t.parent_id
  • )
  • SELECT * FROM tag_path
  • ORDER BY path;
  • It was worked fine on my Mac OS, what's wrong with my ubuntu?
  • My software specification:
  • - Ubuntu 18.04
  • - mysql 5.7.32-0ubuntu0.18.04.1-log
  • - Ruby 2.6.6
  • - gem 3.0.3
  • - rails 5.2.4.4
  • - rbenv 1.0.0
  • I tried to install on my free GCP VM compute but when run `rails db:schema:load
  • `
  • return error:
  • ```root@instance-3:~/qpixel# rails db:schema:load
  • -- create_table("abilities", {:options=>"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", :force=>:cascade})
  • rails aborted!
  • ActiveRecord::StatementInvalid: Mysql2::Error: Unknown collation: 'utf8mb4_0900_ai_ci': CREATE TABLE `abilities` (`id` bigint NOT NULL AUTO_INCREMENT PRIMARY KEY, `community_id` bigint, `name` varchar(255), `description` text, `internal_id` varchar(255), `icon` varchar(255), `post_score_threshold` decimal(10,8), `edit_score_threshold` decimal(10,8), `flag_score_threshold` decimal(10,8), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `summary` text, INDEX `index_abilities_on_community_id` (`community_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
  • ```
  • It was worked fine on my Mac OS, what's wrong with my ubuntu?
  • Maybe I need to install/activate `utf8mb4_0900_ai_ci`, but how to do it? I cant find any resource about install it, just suggestion to change to `utf8mb4_general_ci`
  • My software specification:
  • - Ubuntu 18.04
  • - mysql 5.7.32-0ubuntu0.18.04.1-log
  • - Ruby 2.6.6
  • - gem 3.0.3
  • - rails 5.2.4.4
  • - rbenv 1.0.0
#2: Post edited by user avatar Yaskur‭ · 2021-01-24T03:37:29Z (about 3 years ago)
  • I tried to install on my free GCP VM compute but when run `rails r db/scripts/create_tags_path_view.rb`
  • return error:
  • > /root/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:131:in `_query': Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RECURSIVE tag_path (id, created_at, updated_at, community_id, tag_set_id, wiki_m' at line 2: create view tags_paths as (ActiveRecord::StatementInvalid)
  • WITH RECURSIVE tag_path (id, created_at, updated_at, community_id, tag_set_id, wiki_markdown,
  • wiki, excerpt, parent_id, name, path) AS
  • (
  • SELECT id, created_at, updated_at, community_id, tag_set_id, wiki_markdown,
  • wiki, excerpt, parent_id, name, name as path
  • FROM tags
  • WHERE parent_id IS NULL
  • UNION ALL
  • SELECT t.id, t.created_at, t.updated_at, t.community_id, t.tag_set_id, t.wiki_markdown,
  • t.wiki, t.excerpt, t.parent_id, t.name, concat(tp.path, ' > ', t.name) as path
  • FROM tag_path AS tp JOIN tags AS t ON tp.id = t.parent_id
  • )
  • SELECT * FROM tag_path
  • ORDER BY path;
  • It was worked fine on my Mac OS, what's wrong with my ubuntu?
  • My software specification:
  • - Ubuntu 18.04
  • - mysql 5.7.32-0ubuntu0.18.04.1-log
  • - Ruby 2.6.6
  • - gem 2.6.0
  • - rails 5.2.4.4
  • - rbenv 1.0.0
  • I tried to install on my free GCP VM compute but when run `rails r db/scripts/create_tags_path_view.rb`
  • return error:
  • > /root/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:131:in `_query': Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RECURSIVE tag_path (id, created_at, updated_at, community_id, tag_set_id, wiki_m' at line 2: create view tags_paths as (ActiveRecord::StatementInvalid)
  • WITH RECURSIVE tag_path (id, created_at, updated_at, community_id, tag_set_id, wiki_markdown,
  • wiki, excerpt, parent_id, name, path) AS
  • (
  • SELECT id, created_at, updated_at, community_id, tag_set_id, wiki_markdown,
  • wiki, excerpt, parent_id, name, name as path
  • FROM tags
  • WHERE parent_id IS NULL
  • UNION ALL
  • SELECT t.id, t.created_at, t.updated_at, t.community_id, t.tag_set_id, t.wiki_markdown,
  • t.wiki, t.excerpt, t.parent_id, t.name, concat(tp.path, ' > ', t.name) as path
  • FROM tag_path AS tp JOIN tags AS t ON tp.id = t.parent_id
  • )
  • SELECT * FROM tag_path
  • ORDER BY path;
  • It was worked fine on my Mac OS, what's wrong with my ubuntu?
  • My software specification:
  • - Ubuntu 18.04
  • - mysql 5.7.32-0ubuntu0.18.04.1-log
  • - Ruby 2.6.6
  • - gem 3.0.3
  • - rails 5.2.4.4
  • - rbenv 1.0.0
#1: Initial revision by user avatar Yaskur‭ · 2021-01-24T03:35:31Z (about 3 years ago)
Mysql error when run rails r db/scripts/create_tags_path_view.rb
I tried to install on my free GCP VM compute  but when run `rails r db/scripts/create_tags_path_view.rb`



return error:

 > /root/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:131:in `_query': Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RECURSIVE tag_path (id, created_at, updated_at, community_id, tag_set_id, wiki_m' at line 2: create view tags_paths as (ActiveRecord::StatementInvalid)
WITH RECURSIVE tag_path (id, created_at, updated_at, community_id, tag_set_id, wiki_markdown,
                         wiki, excerpt, parent_id, name, path) AS
                   (
                       SELECT id, created_at, updated_at, community_id, tag_set_id, wiki_markdown,
                              wiki, excerpt, parent_id, name, name as path
                       FROM tags
                       WHERE parent_id IS NULL
                       UNION ALL
                       SELECT t.id, t.created_at, t.updated_at, t.community_id, t.tag_set_id, t.wiki_markdown,
                              t.wiki, t.excerpt, t.parent_id, t.name, concat(tp.path, ' > ', t.name) as path
                       FROM tag_path AS tp JOIN tags AS t ON tp.id = t.parent_id
                   )
SELECT * FROM tag_path
ORDER BY path;



It was worked fine on my Mac OS, what's wrong with my ubuntu?

My software specification:

- Ubuntu 18.04
- mysql 5.7.32-0ubuntu0.18.04.1-log
- Ruby 2.6.6
- gem 2.6.0
- rails 5.2.4.4
- rbenv 1.0.0