In fact, in order to build a website using Ruby, you need more than just the language itself. It would be best if you also had a web framework. A framework is a set of tools that allows you to build websites quickly. Many frameworks are available, and the two best ones are Django and Ruby on Rails. The best aspect of Ruby is that it is entirely free. It’s free to use, copy, modify, and distribute as well.
Popular New Releases in Ruby
rails
5.2.7
jekyll
v3.9.2
fastlane
2.205.2 Improvements
brew
3.4.7
mastodon
v3.5.1
Popular Libraries in Ruby
by rails ruby
50532 MIT
Ruby on Rails
by jekyll ruby
44432 MIT
:globe_with_meridians: Jekyll is a blog-aware static site generator in Ruby
by discourse ruby
35516 NOASSERTION
A platform for community discussion. Free, open, simple.
by fastlane ruby
34761 MIT
🚀 The easiest way to automate building and releasing your iOS and Android apps
by huginn ruby
32968 MIT
Create agents that monitor and act on your behalf. Your agents are standing by!
by Homebrew ruby
31859 BSD-2-Clause
🍺 The missing package manager for macOS (or Linux)
by freeCodeCamp ruby
28474 NOASSERTION
API Documentation Browser
by bayandin ruby
27783
A curated list of awesome awesomeness
by mastodon ruby
27588 AGPL-3.0
Your self-hosted, globally interconnected microblogging community
Trending New libraries in Ruby
by in3rsha ruby
2986 MIT
Animation of the SHA-256 hash function in your terminal.
by excid3 ruby
1581 MIT
Notifications for Ruby on Rails applications
by bensheldon ruby
1296 MIT
Multithreaded, Postgres-based, ActiveJob backend for Ruby on Rails.
by motor-admin ruby
1172 AGPL-3.0
Deploy a no-code admin panel for any application in less than a minute. Search, create, update, and delete data entries, create custom actions, and build reports.
by sureJiang0 ruby
1118 MIT
by TrashUwU ruby
1110
Amazing Free Pokétwo Assistant that identifies Pokémons from Pokétwo spawns, pings a role if a legendary spawns and pins them, pings you if your Shiny Hunt Pokémon spawns and other features like Quest Ping! Every features are automated.
by rails ruby
959 NOASSERTION
by rails ruby
941 MIT
Higher-level data structures built on Redis
by ollypwn ruby
855
PoC for CVE-2020-0601- Windows CryptoAPI (Crypt32.dll)
Top Authors in Ruby
1
71112 Libraries
791
2
1812 Libraries
259
3
1683 Libraries
328
4
1249 Libraries
1
5
900 Libraries
28
6
728 Libraries
742
7
618 Libraries
0
8
441 Libraries
125
9
389 Libraries
15810
10
353 Libraries
2773
1
71112 Libraries
791
2
1812 Libraries
259
3
1683 Libraries
328
4
1249 Libraries
1
5
900 Libraries
28
6
728 Libraries
742
7
618 Libraries
0
8
441 Libraries
125
9
389 Libraries
15810
10
353 Libraries
2773
Trending Kits in Ruby
Ruby is fun to learn and work with. It’s also a very high-level language, meaning instead of you doing everything manually, Ruby handles all the fine-print details and abstracts it away. It’s so easy that you can build almost anything from scratch using Ruby. We also have a thriving community of Ruby developers, thanks to which we have various unique open-source libraries for various use cases. For processes like form validation, using these Ruby on Rails libraries, you can ensure that the input data is consistent and in the correct format.
Here we list down some of the best open-source form validation libraries in Ruby. Formstatic at its core is a Rails FormBuilder DSL. It has been developed with the goal to help web developers create semantically rich form fields and readily stylable HTML form validations for your Rails applications. Simple Form with nearly 8k stars on Github makes Rails forms easy to handle. It inherits most of its DSL from Formstatic and aims to be flexible while helping you handle powerful components as you define the layout of your form. We also have a library called Client-Side Validations which does exactly what you think it does. It automatically extracts and applies validation rules defined on the server-side to the client and can validate nested fields as well, all the while offering browser-wide compliancy.
Build interactive data visualizations, dashboards, custom reports and more in Ruby. Get ratings, code snippets & documentation for each library.
Build enhanced server side scripting for various usecases in Ruby for your application.Get ratings, code snippets & documentation for each library.
Ruby is an object-oriented programming language. It was created by Yukihiro Matsumoto in 1995 with the intention of making programming more fun. It is a dynamic, reflective and it is focused on simplicity and productivity. Ruby has several applications, including web development and system administration. It can be used to build websites and perform many other tasks. Ruby Coding Assessment Libraries are an important part of the Ruby ecosystem. They help developers to evaluate their skills, document their experience and show their expertise. Ruby Coding Assessment libraries are the best places to find Ruby Coding Assessments. This is because they have a great collection of code examples and resources that can be used for Ruby Coding Assessments. Popular Ruby Coding Assessment open source libraries include: corneal - Ruby gem that is a Sinatra app generator; expertiza - web application; mumuki-laboratory - students practice and receive automated and human feedback.
Trending Discussions on Ruby
Google OAuth 2.0 failing with Error 400: invalid_request for some client_id, but works well for others in the same project
visit_Psych_Nodes_Alias: Unknown alias: default (Psych::BadAlias)
Install older Ruby versions on a M1 MacBook?
Rails 7 asset pipeline SassC::SyntaxError with Tailwind
how to repeat the height for grid-auto-rows
Unicode Normalization not appropriate for ASCII-8BIT
Rails 7 Ruby 3.1 LoadError: cannot load such file -- net/smtp
Rails bundle install Could not find turbo-rails-7.1.1 in any of the sources
Heroku fails during build with Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (93)
refusing to allow a Personal Access Token to create or update workflow
QUESTION
Google OAuth 2.0 failing with Error 400: invalid_request for some client_id, but works well for others in the same project
Asked 2022-Mar-30 at 14:21We have some apps (or maybe we should call them a handful of scripts) that use Google APIs to facilitate some administrative tasks. Recently, after making another client_id in the same project, I started getting an error message similar to the one described in localhost redirect_uri does not work for Google Oauth2 (results in 400: invalid_request error). I.e.,
Error 400: invalid_request
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy for keeping apps secure.
You can let the app developer know that this app doesn't comply with one or more Google validation rules.
Request details:
The content in this section has been provided by the app developer. This content has not been reviewed or verified by Google.
If you’re the app developer, make sure that these request details comply with Google policies.
redirect_uri: urn:ietf:wg:oauth:2.0:oob
How do I get through this error? It is important to note that:
- The OAuth consent screen for this project is marked as "Internal". Therefore any mentions of Google review of the project, or publishing status are irrelevant
- I do have "Trust internal, domain-owned apps" enabled for the domain
- Another client id in the same project works and there are no obvious differences between the client IDs - they are both "Desktop" type which only gives me a Client ID and Client secret that are different
- This is a command line script, so I use the "copy/paste" verification method as documented here hence the
urn:ietf:wg:oauth:2.0:oob
redirect URI (copy/paste is the only friendly way to run this on a headless machine which has no browser). - I was able to reproduce the same problem in a dev domain. I have three client ids. The oldest one is from January 2021, another one from December 2021, and one I created today - March 2022. Of those, only the December 2021 works and lets me choose which account to authenticate with before it either accepts it or rejects it with "Error 403: org_internal" (this is expected). The other two give me an "Error 400: invalid_request" and do not even let me choose the "internal" account. Here are the URLs generated by my app (I use the ruby google client APIs) and the only difference between them is the client_id - January 2021, December 2021, March 2022.
Here is the part of the code around the authorization flow, and the URLs for the different client IDs are what was produced on the $stderr.puts url
line. It is pretty much the same thing as documented in the official example here (version as of this writing).
1
2OOB_URI = 'urn:ietf:wg:oauth:2.0:oob'
3
4def user_credentials_for(scope, user_id = 'default')
5 token_store = Google::Auth::Stores::FileTokenStore.new(:file => token_store_path)
6 authorizer = Google::Auth::UserAuthorizer.new(client_id, scope, token_store)
7 credentials = authorizer.get_credentials(user_id)
8 if credentials.nil?
9 url = authorizer.get_authorization_url(base_url: OOB_URI)
10 $stderr.puts ""
11 $stderr.puts "-----------------------------------------------"
12 $stderr.puts "Requesting authorization for '#{user_id}'"
13 $stderr.puts "Open the following URL in your browser and authorize the application."
14 $stderr.puts url
15 code = $stdin.readline.chomp
16 $stderr.puts "-----------------------------------------------"
17 credentials = authorizer.get_and_store_credentials_from_code(
18 user_id: user_id, code: code, base_url: OOB_URI)
19 end
20 credentials
21end
22
23
ANSWER
Answered 2022-Mar-02 at 07:56steps.oauth.v2.invalid_request 400 This error name is used for multiple different kinds of errors, typically for missing or incorrect parameters sent in the request. If is set to false, use fault variables (described below) to retrieve details about the error, such as the fault name and cause.
- GenerateAccessToken GenerateAuthorizationCode
- GenerateAccessTokenImplicitGrant
- RefreshAccessToken
QUESTION
visit_Psych_Nodes_Alias: Unknown alias: default (Psych::BadAlias)
Asked 2022-Mar-19 at 10:21I updated from ruby 2.7.1 to 3.1.1, then removed Gemfile.lock and ran bundle update
(it's on a dev branch, so I can throw it away if this is a bad idea, I just wanted to see if it would work).
bundle update
succeeds, but when I start the server:
1rails s
2=> Booting Puma
3=> Rails 7.0.2.2 application starting in development
4=> Run `bin/rails server --help` for more startup options
5Exiting
6/Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:430:in `visit_Psych_Nodes_Alias': Unknown alias: default (Psych::BadAlias)
7 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
8 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
9 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
10 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
11 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
12 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
13 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
14 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
15 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
16 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
17 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
18 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
19 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
20 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
21 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
22 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
23 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
24 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
25 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
26 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:318:in `visit_Psych_Nodes_Document'
27 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
28 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
29 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
30 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych.rb:335:in `safe_load'
31 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych.rb:370:in `load'
32 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:30:in `available_environments'
33 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:21:in `current'
34 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:15:in `inquire'
35 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:7:in `inquire'
36 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/instance.rb:11:in `env'
37 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/instance.rb:18:in `config'
38 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker.rb:34:in `config'
39 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/railtie.rb:32:in `block in <class:Engine>'
40 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:32:in `instance_exec'
41 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:32:in `run'
42 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:61:in `block in run_initializers'
43 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:228:in `block in tsort_each'
44 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
45 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:431:in `each_strongly_connected_component_from'
46 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:349:in `block in each_strongly_connected_component'
47 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `each'
48 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `call'
49 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `each_strongly_connected_component'
50 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:226:in `tsort_each'
51 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:205:in `tsort_each'
52 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:60:in `run_initializers'
53 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/application.rb:372:in `initialize!'
54 from /Users/st/rails/hangswith/config/environment.rb:5:in `<main>'
55 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
56 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
57 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
58 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:42:in `require_relative'
59 from config.ru:3:in `block in <main>'
60 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
61 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
62 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
63 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
64 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
65 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
66 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
67 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:76:in `log_to_stdout'
68 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:36:in `start'
69 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:143:in `block in perform'
70 from <internal:kernel>:90:in `tap'
71 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:134:in `perform'
72 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
73 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
74 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
75 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/command/base.rb:87:in `perform'
76 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/command.rb:48:in `invoke'
77 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands.rb:18:in `<main>'
78 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
79 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
80 from bin/rails:4:in `<main>'
81
Googling the 'psych' error message reveals this which may be related. But when I search the entire app for YAML.safe_load
(or even just safe_load
), there are 0 occurrences of it. (perhaps I should be searching actual gems in my app?).
It was a long shot but based on this comment, I ran gem rdoc --all
to update all rdoc documentations. But that didn't help.
ANSWER
Answered 2022-Mar-19 at 10:21The problem is related to the Ruby 3.1 / Psych 4.x incompatibility described in this issue: https://bugs.ruby-lang.org/issues/17866
Ruby 3.0 comes with Psych 3, while Ruby 3.1 comes with Psych 4, which has a major breaking change (diff 3.3.2 → 4.0.0).
- The new YAML loading methods (Psych 4) do not load aliases unless they get the
aliases: true
argument. - The old YAML loading methods (Psych 3) do not support the
aliases
keyword.
At this point, it seems like anyone, anywhere that wants to load YAML in the same way it worked prior to Ruby 3.1, need to do something like this:
1rails s
2=> Booting Puma
3=> Rails 7.0.2.2 application starting in development
4=> Run `bin/rails server --help` for more startup options
5Exiting
6/Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:430:in `visit_Psych_Nodes_Alias': Unknown alias: default (Psych::BadAlias)
7 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
8 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
9 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
10 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
11 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
12 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
13 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
14 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
15 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
16 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
17 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
18 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
19 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
20 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
21 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
22 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
23 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
24 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
25 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
26 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:318:in `visit_Psych_Nodes_Document'
27 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
28 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
29 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
30 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych.rb:335:in `safe_load'
31 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych.rb:370:in `load'
32 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:30:in `available_environments'
33 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:21:in `current'
34 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:15:in `inquire'
35 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:7:in `inquire'
36 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/instance.rb:11:in `env'
37 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/instance.rb:18:in `config'
38 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker.rb:34:in `config'
39 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/railtie.rb:32:in `block in <class:Engine>'
40 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:32:in `instance_exec'
41 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:32:in `run'
42 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:61:in `block in run_initializers'
43 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:228:in `block in tsort_each'
44 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
45 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:431:in `each_strongly_connected_component_from'
46 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:349:in `block in each_strongly_connected_component'
47 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `each'
48 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `call'
49 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `each_strongly_connected_component'
50 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:226:in `tsort_each'
51 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:205:in `tsort_each'
52 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:60:in `run_initializers'
53 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/application.rb:372:in `initialize!'
54 from /Users/st/rails/hangswith/config/environment.rb:5:in `<main>'
55 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
56 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
57 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
58 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:42:in `require_relative'
59 from config.ru:3:in `block in <main>'
60 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
61 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
62 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
63 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
64 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
65 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
66 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
67 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:76:in `log_to_stdout'
68 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:36:in `start'
69 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:143:in `block in perform'
70 from <internal:kernel>:90:in `tap'
71 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:134:in `perform'
72 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
73 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
74 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
75 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/command/base.rb:87:in `perform'
76 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/command.rb:48:in `invoke'
77 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands.rb:18:in `<main>'
78 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
79 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
80 from bin/rails:4:in `<main>'
81begin
82 YAML.load(source, aliases: true, **options)
83rescue ArgumentError
84 YAML.load(source, **options)
85end
86
In your case, I suspect you will need to see which Rails version that matches your major version preference includes this patch before you can upgrade to Ruby 3.1.
Personally, wherever I have control of the code that loads YAML, I am adding an extension like this:
1rails s
2=> Booting Puma
3=> Rails 7.0.2.2 application starting in development
4=> Run `bin/rails server --help` for more startup options
5Exiting
6/Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:430:in `visit_Psych_Nodes_Alias': Unknown alias: default (Psych::BadAlias)
7 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
8 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
9 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
10 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
11 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
12 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
13 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
14 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
15 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
16 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
17 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
18 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
19 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
20 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
21 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
22 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
23 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
24 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
25 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
26 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:318:in `visit_Psych_Nodes_Document'
27 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
28 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
29 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
30 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych.rb:335:in `safe_load'
31 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych.rb:370:in `load'
32 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:30:in `available_environments'
33 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:21:in `current'
34 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:15:in `inquire'
35 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:7:in `inquire'
36 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/instance.rb:11:in `env'
37 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/instance.rb:18:in `config'
38 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker.rb:34:in `config'
39 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/railtie.rb:32:in `block in <class:Engine>'
40 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:32:in `instance_exec'
41 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:32:in `run'
42 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:61:in `block in run_initializers'
43 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:228:in `block in tsort_each'
44 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
45 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:431:in `each_strongly_connected_component_from'
46 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:349:in `block in each_strongly_connected_component'
47 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `each'
48 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `call'
49 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `each_strongly_connected_component'
50 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:226:in `tsort_each'
51 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:205:in `tsort_each'
52 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:60:in `run_initializers'
53 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/application.rb:372:in `initialize!'
54 from /Users/st/rails/hangswith/config/environment.rb:5:in `<main>'
55 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
56 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
57 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
58 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:42:in `require_relative'
59 from config.ru:3:in `block in <main>'
60 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
61 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
62 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
63 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
64 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
65 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
66 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
67 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:76:in `log_to_stdout'
68 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:36:in `start'
69 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:143:in `block in perform'
70 from <internal:kernel>:90:in `tap'
71 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:134:in `perform'
72 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
73 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
74 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
75 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/command/base.rb:87:in `perform'
76 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/command.rb:48:in `invoke'
77 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands.rb:18:in `<main>'
78 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
79 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
80 from bin/rails:4:in `<main>'
81begin
82 YAML.load(source, aliases: true, **options)
83rescue ArgumentError
84 YAML.load(source, **options)
85end
86module YAML
87 def self.properly_load_file(path)
88 YAML.load_file path, aliases: true
89 rescue ArgumentError
90 YAML.load_file path
91 end
92end
93
or, if I want to completely revert this change done in Psych 4, I add this to my code:
1rails s
2=> Booting Puma
3=> Rails 7.0.2.2 application starting in development
4=> Run `bin/rails server --help` for more startup options
5Exiting
6/Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:430:in `visit_Psych_Nodes_Alias': Unknown alias: default (Psych::BadAlias)
7 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
8 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
9 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
10 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
11 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
12 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
13 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
14 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
15 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
16 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
17 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
18 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
19 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
20 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
21 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
22 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
23 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
24 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
25 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
26 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:318:in `visit_Psych_Nodes_Document'
27 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
28 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
29 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
30 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych.rb:335:in `safe_load'
31 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych.rb:370:in `load'
32 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:30:in `available_environments'
33 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:21:in `current'
34 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:15:in `inquire'
35 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:7:in `inquire'
36 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/instance.rb:11:in `env'
37 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/instance.rb:18:in `config'
38 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker.rb:34:in `config'
39 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/railtie.rb:32:in `block in <class:Engine>'
40 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:32:in `instance_exec'
41 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:32:in `run'
42 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:61:in `block in run_initializers'
43 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:228:in `block in tsort_each'
44 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
45 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:431:in `each_strongly_connected_component_from'
46 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:349:in `block in each_strongly_connected_component'
47 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `each'
48 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `call'
49 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `each_strongly_connected_component'
50 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:226:in `tsort_each'
51 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:205:in `tsort_each'
52 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:60:in `run_initializers'
53 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/application.rb:372:in `initialize!'
54 from /Users/st/rails/hangswith/config/environment.rb:5:in `<main>'
55 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
56 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
57 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
58 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:42:in `require_relative'
59 from config.ru:3:in `block in <main>'
60 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
61 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
62 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
63 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
64 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
65 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
66 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
67 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:76:in `log_to_stdout'
68 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:36:in `start'
69 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:143:in `block in perform'
70 from <internal:kernel>:90:in `tap'
71 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:134:in `perform'
72 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
73 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
74 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
75 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/command/base.rb:87:in `perform'
76 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/command.rb:48:in `invoke'
77 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands.rb:18:in `<main>'
78 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
79 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
80 from bin/rails:4:in `<main>'
81begin
82 YAML.load(source, aliases: true, **options)
83rescue ArgumentError
84 YAML.load(source, **options)
85end
86module YAML
87 def self.properly_load_file(path)
88 YAML.load_file path, aliases: true
89 rescue ArgumentError
90 YAML.load_file path
91 end
92end
93module YAML
94 class << self
95 alias_method :load, :unsafe_load if YAML.respond_to? :unsafe_load
96 end
97end
98
This has the advantage of restoring YAML::load
, and YAML::load_file
(which uses it) to their original glory, and solves everything including libraries that you have no control of, in all Ruby versions.
Lastly, as I mentioned in the comments, in case you prefer a minimally invasive stopgap measure, you might be able to get away with pinning Psych to < 4
in your Gemfile:
1rails s
2=> Booting Puma
3=> Rails 7.0.2.2 application starting in development
4=> Run `bin/rails server --help` for more startup options
5Exiting
6/Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:430:in `visit_Psych_Nodes_Alias': Unknown alias: default (Psych::BadAlias)
7 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
8 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
9 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
10 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
11 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
12 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
13 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
14 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
15 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
16 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
17 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
18 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
19 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
20 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
21 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
22 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
23 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
24 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
25 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
26 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:318:in `visit_Psych_Nodes_Document'
27 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
28 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
29 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
30 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych.rb:335:in `safe_load'
31 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych.rb:370:in `load'
32 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:30:in `available_environments'
33 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:21:in `current'
34 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:15:in `inquire'
35 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/env.rb:7:in `inquire'
36 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/instance.rb:11:in `env'
37 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/instance.rb:18:in `config'
38 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker.rb:34:in `config'
39 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webpacker-4.3.0/lib/webpacker/railtie.rb:32:in `block in <class:Engine>'
40 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:32:in `instance_exec'
41 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:32:in `run'
42 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:61:in `block in run_initializers'
43 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:228:in `block in tsort_each'
44 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
45 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:431:in `each_strongly_connected_component_from'
46 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:349:in `block in each_strongly_connected_component'
47 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `each'
48 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `call'
49 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `each_strongly_connected_component'
50 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:226:in `tsort_each'
51 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:205:in `tsort_each'
52 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/initializable.rb:60:in `run_initializers'
53 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/application.rb:372:in `initialize!'
54 from /Users/st/rails/hangswith/config/environment.rb:5:in `<main>'
55 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
56 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
57 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
58 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:42:in `require_relative'
59 from config.ru:3:in `block in <main>'
60 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
61 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
62 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
63 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
64 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
65 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
66 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
67 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:76:in `log_to_stdout'
68 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:36:in `start'
69 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:143:in `block in perform'
70 from <internal:kernel>:90:in `tap'
71 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands/server/server_command.rb:134:in `perform'
72 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
73 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
74 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
75 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/command/base.rb:87:in `perform'
76 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/command.rb:48:in `invoke'
77 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.2.2/lib/rails/commands.rb:18:in `<main>'
78 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
79 from /Users/st/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
80 from bin/rails:4:in `<main>'
81begin
82 YAML.load(source, aliases: true, **options)
83rescue ArgumentError
84 YAML.load(source, **options)
85end
86module YAML
87 def self.properly_load_file(path)
88 YAML.load_file path, aliases: true
89 rescue ArgumentError
90 YAML.load_file path
91 end
92end
93module YAML
94 class << self
95 alias_method :load, :unsafe_load if YAML.respond_to? :unsafe_load
96 end
97end
98gem 'psych', '< 4'
99
I hope this behavior is reverted in Ruby 3.1.x / Psych.
QUESTION
Install older Ruby versions on a M1 MacBook?
Asked 2022-Feb-22 at 10:22Installing Ruby 3.0.x works fine on M1 MacBooks using rbenv
or asdf
. But older versions like 2.7.x and 2.6.x are having various issues. How do I fix them, without installing both x86 and ARM versions of homebrew
at the same time?
ANSWER
Answered 2022-Feb-22 at 10:22In order to make installing of Ruby versions 2.6.x or 2.7.x successful on M1 MacBook using either rbenv
or asdf
(asdf is used in this example) follow these steps:
Upgrade to the latest version of rbenv
or asdf-ruby
plugin using your prefered installation method. In my case it's asdf-ruby
installed over homebrew:
1brew upgrade asdf
2asdf plugin update ruby
3
Reinstall the current versions of openssl
, readline
and ruby-build
in order to have the latest versions and configs:
1brew upgrade asdf
2asdf plugin update ruby
3brew uninstall --ignore-dependencies readline
4brew uninstall --ignore-dependencies openssl
5brew uninstall --ignore-dependencies ruby-build
6rm -rf /opt/homebrew/etc/openssl@1.1
7brew install -s readline
8brew install -s openssl
9brew install -s ruby-build
10
In your shell config .bashrc
or .zshrc
add the following ENV variables:
1brew upgrade asdf
2asdf plugin update ruby
3brew uninstall --ignore-dependencies readline
4brew uninstall --ignore-dependencies openssl
5brew uninstall --ignore-dependencies ruby-build
6rm -rf /opt/homebrew/etc/openssl@1.1
7brew install -s readline
8brew install -s openssl
9brew install -s ruby-build
10export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)"
11export LDFLAGS="-L/opt/homebrew/opt/readline/lib:$LDFLAGS"
12export CPPFLAGS="-I/opt/homebrew/opt/readline/include:$CPPFLAGS"
13export PKG_CONFIG_PATH="/opt/homebrew/opt/readline/lib/pkgconfig:$PKG_CONFIG_PATH"
14export optflags="-Wno-error=implicit-function-declaration"
15export LDFLAGS="-L/opt/homebrew/opt/libffi/lib:$LDFLAGS"
16export CPPFLAGS="-I/opt/homebrew/opt/libffi/include:$CPPFLAGS"
17export PKG_CONFIG_PATH="/opt/homebrew/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH"
18
This will ensure that the proper libraries and headers are used during the installations and it will ignore the implicit-function-declaration
that is preventing some versions to continue installation. Note that for some other shells like fish
the exporting of these variables will be a bit different.
Now start a new terminal session and you can try installing the older ruby versions:
1brew upgrade asdf
2asdf plugin update ruby
3brew uninstall --ignore-dependencies readline
4brew uninstall --ignore-dependencies openssl
5brew uninstall --ignore-dependencies ruby-build
6rm -rf /opt/homebrew/etc/openssl@1.1
7brew install -s readline
8brew install -s openssl
9brew install -s ruby-build
10export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)"
11export LDFLAGS="-L/opt/homebrew/opt/readline/lib:$LDFLAGS"
12export CPPFLAGS="-I/opt/homebrew/opt/readline/include:$CPPFLAGS"
13export PKG_CONFIG_PATH="/opt/homebrew/opt/readline/lib/pkgconfig:$PKG_CONFIG_PATH"
14export optflags="-Wno-error=implicit-function-declaration"
15export LDFLAGS="-L/opt/homebrew/opt/libffi/lib:$LDFLAGS"
16export CPPFLAGS="-I/opt/homebrew/opt/libffi/include:$CPPFLAGS"
17export PKG_CONFIG_PATH="/opt/homebrew/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH"
18asdf install ruby 2.7.2
19asdf install ruby 2.6.5
20
Note that really old versions below 2.5 might still have issues. Most of the credits go to this Github issue.
UPDATEFor Ruby 2.2 please change the following variable:
1brew upgrade asdf
2asdf plugin update ruby
3brew uninstall --ignore-dependencies readline
4brew uninstall --ignore-dependencies openssl
5brew uninstall --ignore-dependencies ruby-build
6rm -rf /opt/homebrew/etc/openssl@1.1
7brew install -s readline
8brew install -s openssl
9brew install -s ruby-build
10export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)"
11export LDFLAGS="-L/opt/homebrew/opt/readline/lib:$LDFLAGS"
12export CPPFLAGS="-I/opt/homebrew/opt/readline/include:$CPPFLAGS"
13export PKG_CONFIG_PATH="/opt/homebrew/opt/readline/lib/pkgconfig:$PKG_CONFIG_PATH"
14export optflags="-Wno-error=implicit-function-declaration"
15export LDFLAGS="-L/opt/homebrew/opt/libffi/lib:$LDFLAGS"
16export CPPFLAGS="-I/opt/homebrew/opt/libffi/include:$CPPFLAGS"
17export PKG_CONFIG_PATH="/opt/homebrew/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH"
18asdf install ruby 2.7.2
19asdf install ruby 2.6.5
20export RUBY_CONFIGURE_OPTS=openssl@1.0
21
And do a
1brew upgrade asdf
2asdf plugin update ruby
3brew uninstall --ignore-dependencies readline
4brew uninstall --ignore-dependencies openssl
5brew uninstall --ignore-dependencies ruby-build
6rm -rf /opt/homebrew/etc/openssl@1.1
7brew install -s readline
8brew install -s openssl
9brew install -s ruby-build
10export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)"
11export LDFLAGS="-L/opt/homebrew/opt/readline/lib:$LDFLAGS"
12export CPPFLAGS="-I/opt/homebrew/opt/readline/include:$CPPFLAGS"
13export PKG_CONFIG_PATH="/opt/homebrew/opt/readline/lib/pkgconfig:$PKG_CONFIG_PATH"
14export optflags="-Wno-error=implicit-function-declaration"
15export LDFLAGS="-L/opt/homebrew/opt/libffi/lib:$LDFLAGS"
16export CPPFLAGS="-I/opt/homebrew/opt/libffi/include:$CPPFLAGS"
17export PKG_CONFIG_PATH="/opt/homebrew/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH"
18asdf install ruby 2.7.2
19asdf install ruby 2.6.5
20export RUBY_CONFIGURE_OPTS=openssl@1.0
21asdf reshim ruby
22
Thanks @xjlin0 for this update
QUESTION
Rails 7 asset pipeline SassC::SyntaxError with Tailwind
Asked 2022-Feb-19 at 03:31I'm working on getting a new Rails 7 project deployed to production (trying on both Heroku and Render.com) and am getting the following error during build:
1$ tailwindcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css
2
3 Done in 408ms.
4 Done in 0.90s.
5 rake aborted!
6 SassC::SyntaxError: Error: Function rgb is missing argument $green.
7 on line 428 of stdin
8 >> color: rgb(29 78 216 / var(--tw-text-opacity));
9
10 ---------^
11 stdin:428
12
That's what I think is the relevant part, but here's a bit more context of the output if it's helpful.
1$ tailwindcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css
2
3 Done in 408ms.
4 Done in 0.90s.
5 rake aborted!
6 SassC::SyntaxError: Error: Function rgb is missing argument $green.
7 on line 428 of stdin
8 >> color: rgb(29 78 216 / var(--tw-text-opacity));
9
10 ---------^
11 stdin:428
12Preparing app for Rails asset pipeline
13 Running: rake assets:precompile
14 yarn install v1.22.17
15 [1/4] Resolving packages...
16 [2/4] Fetching packages...
17 [3/4] Linking dependencies...
18 [4/4] Building fresh packages...
19 Done in 5.10s.
20 yarn run v1.22.17
21 $ esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds
22
23 app/assets/builds/application.js 185.5kb
24 app/assets/builds/application.js.map 301.0kb
25
26 Done in 0.10s.
27 yarn install v1.22.17
28 [1/4] Resolving packages...
29 success Already up-to-date.
30 Done in 0.12s.
31 yarn run v1.22.17
32 $ tailwindcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css
33
34 Done in 408ms.
35 Done in 0.90s.
36 rake aborted!
37 SassC::SyntaxError: Error: Function rgb is missing argument $green.
38 on line 428 of stdin
39 >> color: rgb(29 78 216 / var(--tw-text-opacity));
40
41 ---------^
42 stdin:428
43 /tmp/build_d9d0bde2/vendor/bundle/ruby/3.0.0/gems/sassc-2.4.0/lib/sassc/engine.rb:50:in `render'
44 /tmp/build_d9d0bde2/vendor/bundle/ruby/3.0.0/gems/sassc-rails-2.1.2/lib/sassc/rails/compressor.rb:29:in `call'
45 /tmp/build_d9d0bde2/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.2/lib/sprockets/sass_compressor.rb:30:in `call'
46 /tmp/build_d9d0bde2/vendor/bundle/ruby/3.0.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:84:in `call_processor'
47
I set up the project using rails new project_name -j esbuild --css tailwind
. Development mode works fine, just production deployment.
I'm not really sure where to even begin debugging this.
ANSWER
Answered 2021-Dec-18 at 05:58From rails tailwind readme
Tailwind uses modern CSS features that are not recognized by the sassc-rails extension that was included by default in the Gemfile for Rails 6. In order to avoid any errors like SassC::SyntaxError, you must remove that gem from your Gemfile.
QUESTION
how to repeat the height for grid-auto-rows
Asked 2022-Feb-08 at 22:51I am trying to show only the first two rows of a CSS GRID.
The width of the container is unknown therefore it should be responsive.
Also the content of each box is unknown.
My current hacky solution is to define the following two rules:
- use an automatic height for the first two rows
- set the height of the next 277 rows to 0 height
grid-auto-rows: auto auto 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
I tried repeat() like this: grid-auto-rows: auto auto repeat(277, 0px)
but unfortunately it didn't set the height to 0.
Is there any clean way to repeat height 0?
1ul {
2 display: grid;
3 grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
4 grid-auto-rows: auto auto 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
5 overflow: hidden;
6 padding: 0;
7}
8
9li {
10 list-style: none;
11 padding: 10px;
12 border: 1px solid orange;
13 overflow: hidden;
14 margin: 0 5px 5px 0;
15}
1ul {
2 display: grid;
3 grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
4 grid-auto-rows: auto auto 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
5 overflow: hidden;
6 padding: 0;
7}
8
9li {
10 list-style: none;
11 padding: 10px;
12 border: 1px solid orange;
13 overflow: hidden;
14 margin: 0 5px 5px 0;
15}<h1><a href="https://en.wikipedia.org/wiki/List_of_colors:_A%E2%80%93F">Colors</a></h1>
16<ul>
17 <li>Android green</li>
18 <li>Antique brass</li>
19 <li>Antique bronze</li>
20 <li>Antique fuchsia</li>
21 <li>Antique ruby</li>
22 <li>Antique white</li>
23 <li>Ao (English)</li>
24 <li>Apple green</li>
25 <li>Apricot</li>
26 <li>Aqua</li>
27 <li>Aquamarine</li>
28 <li>Arctic lime</li>
29 <li>Army green</li>
30 <li>Artichoke</li>
31 <li>Arylide yellow</li>
32 <li>Ash gray</li>
33 <li>Asparagus</li>
34 <li>Astronaut</li>
35 <li>Atomic tangerine</li>
36 <li>Auburn</li>
37 <li>Aureolin</li>
38 <li>Avocado</li>
39 <li>Azure</li>
40 <li>Azure (X11/web color)</li>
41 <li>Baby blue</li>
42 <li>Baby blue eyes</li>
43 <li>Baby pink</li>
44 <li>Baby powder</li>
45 <li>Baker-Miller pink</li>
46 <li>Banana Mania</li>
47 <li>Barbie Pink</li>
48 <li>Barn red</li>
49 <li>Battleship grey</li>
50 <li>Beau blue</li>
51 <li>Beaver</li>
52 <li>Beige</li>
53 <li>B'dazzled blue</li>
54 <li>Big dip o’ruby</li>
55 <li>Bisque</li>
56 <li>Bistre</li>
57 <li>Bistre brown</li>
58 <li>Bitter lemon</li>
59 <li>Bitter lime</li>
60 <li>Bittersweet</li>
61 <li>Bittersweet shimmer</li>
62 <li>Black</li>
63 <li>Black bean</li>
64 <li>Black chocolate</li>
65 <li>Black coffee</li>
66 <li>Black coral</li>
67 <li>Black olive</li>
68 <li>Black Shadows</li>
69 <li>Blanched almond</li>
70 <li>Blast-off bronze</li>
71 <li>Bleu de France</li>
72 <li>Blizzard blue</li>
73 <li>Blond</li>
74 <li>Blood red</li>
75 <li>Blue</li>
76 <li>Blue (Crayola)</li>
77 <li>Blue (Munsell)</li>
78 <li>Blue (NCS)</li>
79 <li>Blue (Pantone)</li>
80 <li>Blue (pigment)</li>
81 <li>Blue (RYB)</li>
82 <li>Blue bell</li>
83 <li>Blue-gray</li>
84 <li>Blue-green</li>
85 <li>Blue-green (color wheel)</li>
86 <li>Blue jeans</li>
87 <li>Blue sapphire</li>
88 <li>Blue-violet</li>
89 <li>Blue-violet (Crayola)</li>
90 <li>Blue-violet (color wheel)</li>
91 <li>Blue yonder</li>
92 <li>Bluetiful</li>
93 <li>Blush</li>
94 <li>Bole</li>
95 <li>Bone</li>
96 <li>Bottle green</li>
97 <li>Brandy</li>
98 <li>Brick red</li>
99 <li>Bright green</li>
100 <li>Bright lilac</li>
101 <li>Bright maroon</li>
102 <li>Bright navy blue</li>
103 <li>Bright yellow (Crayola)</li>
104 <li>Brilliant rose</li>
105</ul>
ANSWER
Answered 2022-Feb-07 at 21:16Define a template for the two rows and then use grid-auto-rows
with 0
1ul {
2 display: grid;
3 grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
4 grid-auto-rows: auto auto 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
5 overflow: hidden;
6 padding: 0;
7}
8
9li {
10 list-style: none;
11 padding: 10px;
12 border: 1px solid orange;
13 overflow: hidden;
14 margin: 0 5px 5px 0;
15}<h1><a href="https://en.wikipedia.org/wiki/List_of_colors:_A%E2%80%93F">Colors</a></h1>
16<ul>
17 <li>Android green</li>
18 <li>Antique brass</li>
19 <li>Antique bronze</li>
20 <li>Antique fuchsia</li>
21 <li>Antique ruby</li>
22 <li>Antique white</li>
23 <li>Ao (English)</li>
24 <li>Apple green</li>
25 <li>Apricot</li>
26 <li>Aqua</li>
27 <li>Aquamarine</li>
28 <li>Arctic lime</li>
29 <li>Army green</li>
30 <li>Artichoke</li>
31 <li>Arylide yellow</li>
32 <li>Ash gray</li>
33 <li>Asparagus</li>
34 <li>Astronaut</li>
35 <li>Atomic tangerine</li>
36 <li>Auburn</li>
37 <li>Aureolin</li>
38 <li>Avocado</li>
39 <li>Azure</li>
40 <li>Azure (X11/web color)</li>
41 <li>Baby blue</li>
42 <li>Baby blue eyes</li>
43 <li>Baby pink</li>
44 <li>Baby powder</li>
45 <li>Baker-Miller pink</li>
46 <li>Banana Mania</li>
47 <li>Barbie Pink</li>
48 <li>Barn red</li>
49 <li>Battleship grey</li>
50 <li>Beau blue</li>
51 <li>Beaver</li>
52 <li>Beige</li>
53 <li>B'dazzled blue</li>
54 <li>Big dip o’ruby</li>
55 <li>Bisque</li>
56 <li>Bistre</li>
57 <li>Bistre brown</li>
58 <li>Bitter lemon</li>
59 <li>Bitter lime</li>
60 <li>Bittersweet</li>
61 <li>Bittersweet shimmer</li>
62 <li>Black</li>
63 <li>Black bean</li>
64 <li>Black chocolate</li>
65 <li>Black coffee</li>
66 <li>Black coral</li>
67 <li>Black olive</li>
68 <li>Black Shadows</li>
69 <li>Blanched almond</li>
70 <li>Blast-off bronze</li>
71 <li>Bleu de France</li>
72 <li>Blizzard blue</li>
73 <li>Blond</li>
74 <li>Blood red</li>
75 <li>Blue</li>
76 <li>Blue (Crayola)</li>
77 <li>Blue (Munsell)</li>
78 <li>Blue (NCS)</li>
79 <li>Blue (Pantone)</li>
80 <li>Blue (pigment)</li>
81 <li>Blue (RYB)</li>
82 <li>Blue bell</li>
83 <li>Blue-gray</li>
84 <li>Blue-green</li>
85 <li>Blue-green (color wheel)</li>
86 <li>Blue jeans</li>
87 <li>Blue sapphire</li>
88 <li>Blue-violet</li>
89 <li>Blue-violet (Crayola)</li>
90 <li>Blue-violet (color wheel)</li>
91 <li>Blue yonder</li>
92 <li>Bluetiful</li>
93 <li>Blush</li>
94 <li>Bole</li>
95 <li>Bone</li>
96 <li>Bottle green</li>
97 <li>Brandy</li>
98 <li>Brick red</li>
99 <li>Bright green</li>
100 <li>Bright lilac</li>
101 <li>Bright maroon</li>
102 <li>Bright navy blue</li>
103 <li>Bright yellow (Crayola)</li>
104 <li>Brilliant rose</li>
105</ul>ul {
106 display: grid;
107 grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
108 grid-template-rows: auto auto;
109 grid-auto-rows: 0;
110 overflow: hidden;
111 padding: 0;
112}
113
114li {
115 list-style: none;
116 padding: 10px;
117 border: 1px solid orange;
118 overflow: hidden;
119 margin: 0 5px 5px 0;
120}
1ul {
2 display: grid;
3 grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
4 grid-auto-rows: auto auto 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
5 overflow: hidden;
6 padding: 0;
7}
8
9li {
10 list-style: none;
11 padding: 10px;
12 border: 1px solid orange;
13 overflow: hidden;
14 margin: 0 5px 5px 0;
15}<h1><a href="https://en.wikipedia.org/wiki/List_of_colors:_A%E2%80%93F">Colors</a></h1>
16<ul>
17 <li>Android green</li>
18 <li>Antique brass</li>
19 <li>Antique bronze</li>
20 <li>Antique fuchsia</li>
21 <li>Antique ruby</li>
22 <li>Antique white</li>
23 <li>Ao (English)</li>
24 <li>Apple green</li>
25 <li>Apricot</li>
26 <li>Aqua</li>
27 <li>Aquamarine</li>
28 <li>Arctic lime</li>
29 <li>Army green</li>
30 <li>Artichoke</li>
31 <li>Arylide yellow</li>
32 <li>Ash gray</li>
33 <li>Asparagus</li>
34 <li>Astronaut</li>
35 <li>Atomic tangerine</li>
36 <li>Auburn</li>
37 <li>Aureolin</li>
38 <li>Avocado</li>
39 <li>Azure</li>
40 <li>Azure (X11/web color)</li>
41 <li>Baby blue</li>
42 <li>Baby blue eyes</li>
43 <li>Baby pink</li>
44 <li>Baby powder</li>
45 <li>Baker-Miller pink</li>
46 <li>Banana Mania</li>
47 <li>Barbie Pink</li>
48 <li>Barn red</li>
49 <li>Battleship grey</li>
50 <li>Beau blue</li>
51 <li>Beaver</li>
52 <li>Beige</li>
53 <li>B'dazzled blue</li>
54 <li>Big dip o’ruby</li>
55 <li>Bisque</li>
56 <li>Bistre</li>
57 <li>Bistre brown</li>
58 <li>Bitter lemon</li>
59 <li>Bitter lime</li>
60 <li>Bittersweet</li>
61 <li>Bittersweet shimmer</li>
62 <li>Black</li>
63 <li>Black bean</li>
64 <li>Black chocolate</li>
65 <li>Black coffee</li>
66 <li>Black coral</li>
67 <li>Black olive</li>
68 <li>Black Shadows</li>
69 <li>Blanched almond</li>
70 <li>Blast-off bronze</li>
71 <li>Bleu de France</li>
72 <li>Blizzard blue</li>
73 <li>Blond</li>
74 <li>Blood red</li>
75 <li>Blue</li>
76 <li>Blue (Crayola)</li>
77 <li>Blue (Munsell)</li>
78 <li>Blue (NCS)</li>
79 <li>Blue (Pantone)</li>
80 <li>Blue (pigment)</li>
81 <li>Blue (RYB)</li>
82 <li>Blue bell</li>
83 <li>Blue-gray</li>
84 <li>Blue-green</li>
85 <li>Blue-green (color wheel)</li>
86 <li>Blue jeans</li>
87 <li>Blue sapphire</li>
88 <li>Blue-violet</li>
89 <li>Blue-violet (Crayola)</li>
90 <li>Blue-violet (color wheel)</li>
91 <li>Blue yonder</li>
92 <li>Bluetiful</li>
93 <li>Blush</li>
94 <li>Bole</li>
95 <li>Bone</li>
96 <li>Bottle green</li>
97 <li>Brandy</li>
98 <li>Brick red</li>
99 <li>Bright green</li>
100 <li>Bright lilac</li>
101 <li>Bright maroon</li>
102 <li>Bright navy blue</li>
103 <li>Bright yellow (Crayola)</li>
104 <li>Brilliant rose</li>
105</ul>ul {
106 display: grid;
107 grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
108 grid-template-rows: auto auto;
109 grid-auto-rows: 0;
110 overflow: hidden;
111 padding: 0;
112}
113
114li {
115 list-style: none;
116 padding: 10px;
117 border: 1px solid orange;
118 overflow: hidden;
119 margin: 0 5px 5px 0;
120}<h1><a href="https://en.wikipedia.org/wiki/List_of_colors:_A%E2%80%93F">Colors</a></h1>
121<ul>
122 <li>Android green</li>
123 <li>Antique brass</li>
124 <li>Antique bronze</li>
125 <li>Antique fuchsia</li>
126 <li>Antique ruby</li>
127 <li>Antique white</li>
128 <li>Ao (English)</li>
129 <li>Apple green</li>
130 <li>Apricot</li>
131 <li>Aqua</li>
132 <li>Aquamarine</li>
133 <li>Arctic lime</li>
134 <li>Army green</li>
135 <li>Artichoke</li>
136 <li>Arylide yellow</li>
137 <li>Ash gray</li>
138 <li>Asparagus</li>
139 <li>Astronaut</li>
140 <li>Atomic tangerine</li>
141 <li>Auburn</li>
142 <li>Aureolin</li>
143 <li>Avocado</li>
144 <li>Azure</li>
145 <li>Azure (X11/web color)</li>
146 <li>Baby blue</li>
147 <li>Baby blue eyes</li>
148 <li>Baby pink</li>
149 <li>Baby powder</li>
150 <li>Baker-Miller pink</li>
151 <li>Banana Mania</li>
152 <li>Barbie Pink</li>
153 <li>Barn red</li>
154 <li>Battleship grey</li>
155 <li>Beau blue</li>
156 <li>Beaver</li>
157 <li>Beige</li>
158 <li>B'dazzled blue</li>
159 <li>Big dip o’ruby</li>
160 <li>Bisque</li>
161 <li>Bistre</li>
162 <li>Bistre brown</li>
163 <li>Bitter lemon</li>
164 <li>Bitter lime</li>
165 <li>Bittersweet</li>
166 <li>Bittersweet shimmer</li>
167 <li>Black</li>
168 <li>Black bean</li>
169 <li>Black chocolate</li>
170 <li>Black coffee</li>
171 <li>Black coral</li>
172 <li>Black olive</li>
173 <li>Black Shadows</li>
174 <li>Blanched almond</li>
175 <li>Blast-off bronze</li>
176 <li>Bleu de France</li>
177 <li>Blizzard blue</li>
178 <li>Blond</li>
179 <li>Blood red</li>
180 <li>Blue</li>
181 <li>Blue (Crayola)</li>
182 <li>Blue (Munsell)</li>
183 <li>Blue (NCS)</li>
184 <li>Blue (Pantone)</li>
185 <li>Blue (pigment)</li>
186 <li>Blue (RYB)</li>
187 <li>Blue bell</li>
188 <li>Blue-gray</li>
189 <li>Blue-green</li>
190 <li>Blue-green (color wheel)</li>
191 <li>Blue jeans</li>
192 <li>Blue sapphire</li>
193 <li>Blue-violet</li>
194 <li>Blue-violet (Crayola)</li>
195 <li>Blue-violet (color wheel)</li>
196 <li>Blue yonder</li>
197 <li>Bluetiful</li>
198 <li>Blush</li>
199 <li>Bole</li>
200 <li>Bone</li>
201 <li>Bottle green</li>
202 <li>Brandy</li>
203 <li>Brick red</li>
204 <li>Bright green</li>
205 <li>Bright lilac</li>
206 <li>Bright maroon</li>
207 <li>Bright navy blue</li>
208 <li>Bright yellow (Crayola)</li>
209 <li>Brilliant rose</li>
210</ul>
From the specification:
The grid-auto-columns and grid-auto-rows properties specify the size of tracks not assigned a size by grid-template-rows or grid-template-columns. If multiple track sizes are given, the pattern is repeated as necessary to find the size of the affected tracks.
For the repeat()
idea it can only be used with grid-template-rows
not grid-auto-rows
but you don't have to because the grid-auto-rows
was designed for this purpose "define the height of the remaining rows"
1ul {
2 display: grid;
3 grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
4 grid-auto-rows: auto auto 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
5 overflow: hidden;
6 padding: 0;
7}
8
9li {
10 list-style: none;
11 padding: 10px;
12 border: 1px solid orange;
13 overflow: hidden;
14 margin: 0 5px 5px 0;
15}<h1><a href="https://en.wikipedia.org/wiki/List_of_colors:_A%E2%80%93F">Colors</a></h1>
16<ul>
17 <li>Android green</li>
18 <li>Antique brass</li>
19 <li>Antique bronze</li>
20 <li>Antique fuchsia</li>
21 <li>Antique ruby</li>
22 <li>Antique white</li>
23 <li>Ao (English)</li>
24 <li>Apple green</li>
25 <li>Apricot</li>
26 <li>Aqua</li>
27 <li>Aquamarine</li>
28 <li>Arctic lime</li>
29 <li>Army green</li>
30 <li>Artichoke</li>
31 <li>Arylide yellow</li>
32 <li>Ash gray</li>
33 <li>Asparagus</li>
34 <li>Astronaut</li>
35 <li>Atomic tangerine</li>
36 <li>Auburn</li>
37 <li>Aureolin</li>
38 <li>Avocado</li>
39 <li>Azure</li>
40 <li>Azure (X11/web color)</li>
41 <li>Baby blue</li>
42 <li>Baby blue eyes</li>
43 <li>Baby pink</li>
44 <li>Baby powder</li>
45 <li>Baker-Miller pink</li>
46 <li>Banana Mania</li>
47 <li>Barbie Pink</li>
48 <li>Barn red</li>
49 <li>Battleship grey</li>
50 <li>Beau blue</li>
51 <li>Beaver</li>
52 <li>Beige</li>
53 <li>B'dazzled blue</li>
54 <li>Big dip o’ruby</li>
55 <li>Bisque</li>
56 <li>Bistre</li>
57 <li>Bistre brown</li>
58 <li>Bitter lemon</li>
59 <li>Bitter lime</li>
60 <li>Bittersweet</li>
61 <li>Bittersweet shimmer</li>
62 <li>Black</li>
63 <li>Black bean</li>
64 <li>Black chocolate</li>
65 <li>Black coffee</li>
66 <li>Black coral</li>
67 <li>Black olive</li>
68 <li>Black Shadows</li>
69 <li>Blanched almond</li>
70 <li>Blast-off bronze</li>
71 <li>Bleu de France</li>
72 <li>Blizzard blue</li>
73 <li>Blond</li>
74 <li>Blood red</li>
75 <li>Blue</li>
76 <li>Blue (Crayola)</li>
77 <li>Blue (Munsell)</li>
78 <li>Blue (NCS)</li>
79 <li>Blue (Pantone)</li>
80 <li>Blue (pigment)</li>
81 <li>Blue (RYB)</li>
82 <li>Blue bell</li>
83 <li>Blue-gray</li>
84 <li>Blue-green</li>
85 <li>Blue-green (color wheel)</li>
86 <li>Blue jeans</li>
87 <li>Blue sapphire</li>
88 <li>Blue-violet</li>
89 <li>Blue-violet (Crayola)</li>
90 <li>Blue-violet (color wheel)</li>
91 <li>Blue yonder</li>
92 <li>Bluetiful</li>
93 <li>Blush</li>
94 <li>Bole</li>
95 <li>Bone</li>
96 <li>Bottle green</li>
97 <li>Brandy</li>
98 <li>Brick red</li>
99 <li>Bright green</li>
100 <li>Bright lilac</li>
101 <li>Bright maroon</li>
102 <li>Bright navy blue</li>
103 <li>Bright yellow (Crayola)</li>
104 <li>Brilliant rose</li>
105</ul>ul {
106 display: grid;
107 grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
108 grid-template-rows: auto auto;
109 grid-auto-rows: 0;
110 overflow: hidden;
111 padding: 0;
112}
113
114li {
115 list-style: none;
116 padding: 10px;
117 border: 1px solid orange;
118 overflow: hidden;
119 margin: 0 5px 5px 0;
120}<h1><a href="https://en.wikipedia.org/wiki/List_of_colors:_A%E2%80%93F">Colors</a></h1>
121<ul>
122 <li>Android green</li>
123 <li>Antique brass</li>
124 <li>Antique bronze</li>
125 <li>Antique fuchsia</li>
126 <li>Antique ruby</li>
127 <li>Antique white</li>
128 <li>Ao (English)</li>
129 <li>Apple green</li>
130 <li>Apricot</li>
131 <li>Aqua</li>
132 <li>Aquamarine</li>
133 <li>Arctic lime</li>
134 <li>Army green</li>
135 <li>Artichoke</li>
136 <li>Arylide yellow</li>
137 <li>Ash gray</li>
138 <li>Asparagus</li>
139 <li>Astronaut</li>
140 <li>Atomic tangerine</li>
141 <li>Auburn</li>
142 <li>Aureolin</li>
143 <li>Avocado</li>
144 <li>Azure</li>
145 <li>Azure (X11/web color)</li>
146 <li>Baby blue</li>
147 <li>Baby blue eyes</li>
148 <li>Baby pink</li>
149 <li>Baby powder</li>
150 <li>Baker-Miller pink</li>
151 <li>Banana Mania</li>
152 <li>Barbie Pink</li>
153 <li>Barn red</li>
154 <li>Battleship grey</li>
155 <li>Beau blue</li>
156 <li>Beaver</li>
157 <li>Beige</li>
158 <li>B'dazzled blue</li>
159 <li>Big dip o’ruby</li>
160 <li>Bisque</li>
161 <li>Bistre</li>
162 <li>Bistre brown</li>
163 <li>Bitter lemon</li>
164 <li>Bitter lime</li>
165 <li>Bittersweet</li>
166 <li>Bittersweet shimmer</li>
167 <li>Black</li>
168 <li>Black bean</li>
169 <li>Black chocolate</li>
170 <li>Black coffee</li>
171 <li>Black coral</li>
172 <li>Black olive</li>
173 <li>Black Shadows</li>
174 <li>Blanched almond</li>
175 <li>Blast-off bronze</li>
176 <li>Bleu de France</li>
177 <li>Blizzard blue</li>
178 <li>Blond</li>
179 <li>Blood red</li>
180 <li>Blue</li>
181 <li>Blue (Crayola)</li>
182 <li>Blue (Munsell)</li>
183 <li>Blue (NCS)</li>
184 <li>Blue (Pantone)</li>
185 <li>Blue (pigment)</li>
186 <li>Blue (RYB)</li>
187 <li>Blue bell</li>
188 <li>Blue-gray</li>
189 <li>Blue-green</li>
190 <li>Blue-green (color wheel)</li>
191 <li>Blue jeans</li>
192 <li>Blue sapphire</li>
193 <li>Blue-violet</li>
194 <li>Blue-violet (Crayola)</li>
195 <li>Blue-violet (color wheel)</li>
196 <li>Blue yonder</li>
197 <li>Bluetiful</li>
198 <li>Blush</li>
199 <li>Bole</li>
200 <li>Bone</li>
201 <li>Bottle green</li>
202 <li>Brandy</li>
203 <li>Brick red</li>
204 <li>Bright green</li>
205 <li>Bright lilac</li>
206 <li>Bright maroon</li>
207 <li>Bright navy blue</li>
208 <li>Bright yellow (Crayola)</li>
209 <li>Brilliant rose</li>
210</ul>ul {
211 display: grid;
212 grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
213 grid-template-rows: auto auto repeat(300,0);
214 overflow: hidden;
215 padding: 0;
216}
217
218li {
219 list-style: none;
220 padding: 10px;
221 border: 1px solid orange;
222 overflow: hidden;
223 margin: 0 5px 5px 0;
224}
1ul {
2 display: grid;
3 grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
4 grid-auto-rows: auto auto 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
5 overflow: hidden;
6 padding: 0;
7}
8
9li {
10 list-style: none;
11 padding: 10px;
12 border: 1px solid orange;
13 overflow: hidden;
14 margin: 0 5px 5px 0;
15}<h1><a href="https://en.wikipedia.org/wiki/List_of_colors:_A%E2%80%93F">Colors</a></h1>
16<ul>
17 <li>Android green</li>
18 <li>Antique brass</li>
19 <li>Antique bronze</li>
20 <li>Antique fuchsia</li>
21 <li>Antique ruby</li>
22 <li>Antique white</li>
23 <li>Ao (English)</li>
24 <li>Apple green</li>
25 <li>Apricot</li>
26 <li>Aqua</li>
27 <li>Aquamarine</li>
28 <li>Arctic lime</li>
29 <li>Army green</li>
30 <li>Artichoke</li>
31 <li>Arylide yellow</li>
32 <li>Ash gray</li>
33 <li>Asparagus</li>
34 <li>Astronaut</li>
35 <li>Atomic tangerine</li>
36 <li>Auburn</li>
37 <li>Aureolin</li>
38 <li>Avocado</li>
39 <li>Azure</li>
40 <li>Azure (X11/web color)</li>
41 <li>Baby blue</li>
42 <li>Baby blue eyes</li>
43 <li>Baby pink</li>
44 <li>Baby powder</li>
45 <li>Baker-Miller pink</li>
46 <li>Banana Mania</li>
47 <li>Barbie Pink</li>
48 <li>Barn red</li>
49 <li>Battleship grey</li>
50 <li>Beau blue</li>
51 <li>Beaver</li>
52 <li>Beige</li>
53 <li>B'dazzled blue</li>
54 <li>Big dip o’ruby</li>
55 <li>Bisque</li>
56 <li>Bistre</li>
57 <li>Bistre brown</li>
58 <li>Bitter lemon</li>
59 <li>Bitter lime</li>
60 <li>Bittersweet</li>
61 <li>Bittersweet shimmer</li>
62 <li>Black</li>
63 <li>Black bean</li>
64 <li>Black chocolate</li>
65 <li>Black coffee</li>
66 <li>Black coral</li>
67 <li>Black olive</li>
68 <li>Black Shadows</li>
69 <li>Blanched almond</li>
70 <li>Blast-off bronze</li>
71 <li>Bleu de France</li>
72 <li>Blizzard blue</li>
73 <li>Blond</li>
74 <li>Blood red</li>
75 <li>Blue</li>
76 <li>Blue (Crayola)</li>
77 <li>Blue (Munsell)</li>
78 <li>Blue (NCS)</li>
79 <li>Blue (Pantone)</li>
80 <li>Blue (pigment)</li>
81 <li>Blue (RYB)</li>
82 <li>Blue bell</li>
83 <li>Blue-gray</li>
84 <li>Blue-green</li>
85 <li>Blue-green (color wheel)</li>
86 <li>Blue jeans</li>
87 <li>Blue sapphire</li>
88 <li>Blue-violet</li>
89 <li>Blue-violet (Crayola)</li>
90 <li>Blue-violet (color wheel)</li>
91 <li>Blue yonder</li>
92 <li>Bluetiful</li>
93 <li>Blush</li>
94 <li>Bole</li>
95 <li>Bone</li>
96 <li>Bottle green</li>
97 <li>Brandy</li>
98 <li>Brick red</li>
99 <li>Bright green</li>
100 <li>Bright lilac</li>
101 <li>Bright maroon</li>
102 <li>Bright navy blue</li>
103 <li>Bright yellow (Crayola)</li>
104 <li>Brilliant rose</li>
105</ul>ul {
106 display: grid;
107 grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
108 grid-template-rows: auto auto;
109 grid-auto-rows: 0;
110 overflow: hidden;
111 padding: 0;
112}
113
114li {
115 list-style: none;
116 padding: 10px;
117 border: 1px solid orange;
118 overflow: hidden;
119 margin: 0 5px 5px 0;
120}<h1><a href="https://en.wikipedia.org/wiki/List_of_colors:_A%E2%80%93F">Colors</a></h1>
121<ul>
122 <li>Android green</li>
123 <li>Antique brass</li>
124 <li>Antique bronze</li>
125 <li>Antique fuchsia</li>
126 <li>Antique ruby</li>
127 <li>Antique white</li>
128 <li>Ao (English)</li>
129 <li>Apple green</li>
130 <li>Apricot</li>
131 <li>Aqua</li>
132 <li>Aquamarine</li>
133 <li>Arctic lime</li>
134 <li>Army green</li>
135 <li>Artichoke</li>
136 <li>Arylide yellow</li>
137 <li>Ash gray</li>
138 <li>Asparagus</li>
139 <li>Astronaut</li>
140 <li>Atomic tangerine</li>
141 <li>Auburn</li>
142 <li>Aureolin</li>
143 <li>Avocado</li>
144 <li>Azure</li>
145 <li>Azure (X11/web color)</li>
146 <li>Baby blue</li>
147 <li>Baby blue eyes</li>
148 <li>Baby pink</li>
149 <li>Baby powder</li>
150 <li>Baker-Miller pink</li>
151 <li>Banana Mania</li>
152 <li>Barbie Pink</li>
153 <li>Barn red</li>
154 <li>Battleship grey</li>
155 <li>Beau blue</li>
156 <li>Beaver</li>
157 <li>Beige</li>
158 <li>B'dazzled blue</li>
159 <li>Big dip o’ruby</li>
160 <li>Bisque</li>
161 <li>Bistre</li>
162 <li>Bistre brown</li>
163 <li>Bitter lemon</li>
164 <li>Bitter lime</li>
165 <li>Bittersweet</li>
166 <li>Bittersweet shimmer</li>
167 <li>Black</li>
168 <li>Black bean</li>
169 <li>Black chocolate</li>
170 <li>Black coffee</li>
171 <li>Black coral</li>
172 <li>Black olive</li>
173 <li>Black Shadows</li>
174 <li>Blanched almond</li>
175 <li>Blast-off bronze</li>
176 <li>Bleu de France</li>
177 <li>Blizzard blue</li>
178 <li>Blond</li>
179 <li>Blood red</li>
180 <li>Blue</li>
181 <li>Blue (Crayola)</li>
182 <li>Blue (Munsell)</li>
183 <li>Blue (NCS)</li>
184 <li>Blue (Pantone)</li>
185 <li>Blue (pigment)</li>
186 <li>Blue (RYB)</li>
187 <li>Blue bell</li>
188 <li>Blue-gray</li>
189 <li>Blue-green</li>
190 <li>Blue-green (color wheel)</li>
191 <li>Blue jeans</li>
192 <li>Blue sapphire</li>
193 <li>Blue-violet</li>
194 <li>Blue-violet (Crayola)</li>
195 <li>Blue-violet (color wheel)</li>
196 <li>Blue yonder</li>
197 <li>Bluetiful</li>
198 <li>Blush</li>
199 <li>Bole</li>
200 <li>Bone</li>
201 <li>Bottle green</li>
202 <li>Brandy</li>
203 <li>Brick red</li>
204 <li>Bright green</li>
205 <li>Bright lilac</li>
206 <li>Bright maroon</li>
207 <li>Bright navy blue</li>
208 <li>Bright yellow (Crayola)</li>
209 <li>Brilliant rose</li>
210</ul>ul {
211 display: grid;
212 grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
213 grid-template-rows: auto auto repeat(300,0);
214 overflow: hidden;
215 padding: 0;
216}
217
218li {
219 list-style: none;
220 padding: 10px;
221 border: 1px solid orange;
222 overflow: hidden;
223 margin: 0 5px 5px 0;
224}<h1><a href="https://en.wikipedia.org/wiki/List_of_colors:_A%E2%80%93F">Colors</a></h1>
225<ul>
226 <li>Android green</li>
227 <li>Antique brass</li>
228 <li>Antique bronze</li>
229 <li>Antique fuchsia</li>
230 <li>Antique ruby</li>
231 <li>Antique white</li>
232 <li>Ao (English)</li>
233 <li>Apple green</li>
234 <li>Apricot</li>
235 <li>Aqua</li>
236 <li>Aquamarine</li>
237 <li>Arctic lime</li>
238 <li>Army green</li>
239 <li>Artichoke</li>
240 <li>Arylide yellow</li>
241 <li>Ash gray</li>
242 <li>Asparagus</li>
243 <li>Astronaut</li>
244 <li>Atomic tangerine</li>
245 <li>Auburn</li>
246 <li>Aureolin</li>
247 <li>Avocado</li>
248 <li>Azure</li>
249 <li>Azure (X11/web color)</li>
250 <li>Baby blue</li>
251 <li>Baby blue eyes</li>
252 <li>Baby pink</li>
253 <li>Baby powder</li>
254 <li>Baker-Miller pink</li>
255 <li>Banana Mania</li>
256 <li>Barbie Pink</li>
257 <li>Barn red</li>
258 <li>Battleship grey</li>
259 <li>Beau blue</li>
260 <li>Beaver</li>
261 <li>Beige</li>
262 <li>B'dazzled blue</li>
263 <li>Big dip o’ruby</li>
264 <li>Bisque</li>
265 <li>Bistre</li>
266 <li>Bistre brown</li>
267 <li>Bitter lemon</li>
268 <li>Bitter lime</li>
269 <li>Bittersweet</li>
270 <li>Bittersweet shimmer</li>
271 <li>Black</li>
272 <li>Black bean</li>
273 <li>Black chocolate</li>
274 <li>Black coffee</li>
275 <li>Black coral</li>
276 <li>Black olive</li>
277 <li>Black Shadows</li>
278 <li>Blanched almond</li>
279 <li>Blast-off bronze</li>
280 <li>Bleu de France</li>
281 <li>Blizzard blue</li>
282 <li>Blond</li>
283 <li>Blood red</li>
284 <li>Blue</li>
285 <li>Blue (Crayola)</li>
286 <li>Blue (Munsell)</li>
287 <li>Blue (NCS)</li>
288 <li>Blue (Pantone)</li>
289 <li>Blue (pigment)</li>
290 <li>Blue (RYB)</li>
291 <li>Blue bell</li>
292 <li>Blue-gray</li>
293 <li>Blue-green</li>
294 <li>Blue-green (color wheel)</li>
295 <li>Blue jeans</li>
296 <li>Blue sapphire</li>
297 <li>Blue-violet</li>
298 <li>Blue-violet (Crayola)</li>
299 <li>Blue-violet (color wheel)</li>
300 <li>Blue yonder</li>
301 <li>Bluetiful</li>
302 <li>Blush</li>
303 <li>Bole</li>
304 <li>Bone</li>
305 <li>Bottle green</li>
306 <li>Brandy</li>
307 <li>Brick red</li>
308 <li>Bright green</li>
309 <li>Bright lilac</li>
310 <li>Bright maroon</li>
311 <li>Bright navy blue</li>
312 <li>Bright yellow (Crayola)</li>
313 <li>Brilliant rose</li>
314</ul>
QUESTION
Unicode Normalization not appropriate for ASCII-8BIT
Asked 2022-Jan-26 at 11:38113: from /usr/local/bin/pod:23:in `<main>'
212: from /usr/local/bin/pod:23:in `load'
311: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/bin/pod:55:in `<top (required)>'
410: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/command.rb:52:in `run'
59: from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
68: from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
77: from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
86: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/command.rb:66:in `report_error'
95: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/user_interface/error_report.rb:30:in `report'
104: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/user_interface/error_report.rb:105:in `markdown_podfile'
113: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/config.rb:226:in `podfile_path'
122: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/config.rb:166:in `installation_root'
131: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/config.rb:166:in `unicode_normalize'
14/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
15
I am Facing these errors, don't know why when I run pod update it gives me this error. Any solution??
ANSWER
Answered 2021-Sep-07 at 18:03I fixed it doing this:
I uninstalled completely cocoapods (my version was 1.11.0)
gem list --local | grep cocoapods
cocoapods-core (1.11.0) cocoapods-deintegrate (1.0.5) cocoapods-downloader (1.5.0) cocoapods-plugins (1.0.0) cocoapods-search (1.0.1) cocoapods-trunk (1.6.0) cocoapods-try (1.2.0)
sudo gem uninstall cocoapods
sudo gem uninstall cocoapods-core
sudo gem uninstall cocoapods-deintegrate
sudo gem uninstall cocoapods-downloader
sudo gem uninstall cocoapods-plugins
sudo gem uninstall cocoapods-search
sudo gem uninstall cocoapods-trunk
sudo gem uninstall cocoapods-try
Then i installed cocoapods version 1.10.1 (you can try with more versions under 1.11.0 if you need)
sudo gem install cocoapods -v 1.10.1
QUESTION
Rails 7 Ruby 3.1 LoadError: cannot load such file -- net/smtp
Asked 2022-Jan-25 at 16:15I upgraded to Rails 7 and Ruby 3.1. While trying to run tests with rspec
I got the error below. How can I fix it?
1An error occurred while loading rails_helper.
2Failure/Error: require File.expand_path('../config/environment', __dir__)
3
4LoadError:
5 cannot load such file -- net/smtp
6# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:34:in `require'
7# .../gems/zeitwerk-2.5.2/lib/zeitwerk/kernel.rb:36:in `require'
8# .../gems/mail-2.7.1/lib/mail.rb:9:in `<module:Mail>'
9# .../gems/mail-2.7.1/lib/mail.rb:3:in `<main>'
10# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
11# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
12# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in `register'
13# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
14# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
15# .../gems/zeitwerk-2.5.2/lib/zeitwerk/kernel.rb:36:in `require'
16# .../bundler/gems/rails-6a0f6c4d70b1/actionmailbox/lib/action_mailbox/mail_ext.rb:3:in `<main>'
17# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
18# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
19# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in `register'
20# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
21# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
22# .../gems/zeitwerk-2.5.2/lib/zeitwerk/kernel.rb:36:in `require'
23# .../bundler/gems/rails-6a0f6c4d70b1/actionmailbox/lib/action_mailbox.rb:3:in `<main>'
24# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
25# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
26# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in `register'
27# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
28# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
29# .../gems/zeitwerk-2.5.2/lib/zeitwerk/kernel.rb:36:in `require'
30# .../bundler/gems/rails-6a0f6c4d70b1/actionmailbox/lib/action_mailbox/engine.rb:9:in `<main>'
31# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
32# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
33# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in `register'
34# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
35# .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
36# .../gems/zeitwerk-2.5.2/lib/zeitwerk/kernel.rb:36:in `require'
37# ./config/application.rb:11:in `<top (required)>'
38# ./config/environment.rb:2:in `require_relative'
39# ./config/environment.rb:2:in `<top (required)>'
40# ./spec/rails_helper.rb:4:in `require'
41# ./spec/rails_helper.rb:4:in `<top (required)>'
42No examples found.
43
44
45Finished in 0.00005 seconds (files took 0.57758 seconds to load)
460 examples, 0 failures, 1 error occurred outside of examples
47
ANSWER
Answered 2022-Jan-25 at 16:15UPD: on January 6th, 2022 Rails 7.0.1 was released:
The focus of this release is bring support to Ruby 3.1
Amongh other Ruby 3.1-related issues it brought a fix for this problem. So upgrade to Rails >= 7.0.1.
Add gem 'net-smtp', require: false
to your Gemfile and run bundle
.
Similarly I assume you may have problems with net-imap
and net-pop
and so have to add them until a new mail
gem version is released.
Related pull requests and issues:
QUESTION
Rails bundle install Could not find turbo-rails-7.1.1 in any of the sources
Asked 2022-Jan-21 at 18:20On a brand new digitalocean droplet running Ubuntu 20.10 with a brand new pretty near empty rails 7 alpha 2 app running bundle install
results in the following both when running cap production deploy on my local machine and when running from the command shell on the droplet
1Fetching gem metadata from https://rubygems.org/............
2Could not find turbo-rails-7.1.1 in any of the sources
3
I have no issues locally with this so this has to be an environment issue on the production server or some configuration option I've missed somehere. I am using latest stable rvm which is correctly configured,
1Fetching gem metadata from https://rubygems.org/............
2Could not find turbo-rails-7.1.1 in any of the sources
3rvm gemset list
4
5gemsets for ruby-3.0.0 (found in /home/comtechmaster/.rvm/gems/ruby-3.0.0)
6 (default)
7 global
8=> master_cms
9
10
I used a capistrano script to deploy the app and latest stable version node was installed using nvm. Bundler is the same version on both environments and turbo-rails-7.1.1 does not appear anywhere in my gemfile.lock
ANSWER
Answered 2021-Nov-09 at 14:37I ran into this also. Not sure why, but they yanked the 7.x versions and regressed to 0.8.x:
https://rubygems.org/gems/turbo-rails/versions/7.1.1
Just add this to your Gemfile:
1Fetching gem metadata from https://rubygems.org/............
2Could not find turbo-rails-7.1.1 in any of the sources
3rvm gemset list
4
5gemsets for ruby-3.0.0 (found in /home/comtechmaster/.rvm/gems/ruby-3.0.0)
6 (default)
7 global
8=> master_cms
9
10gem 'turbo-rails', '~> 0.8'
11
And then run and run ./bin/bundle update turbo-rails
and you should be good.
QUESTION
Heroku fails during build with Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (93)
Asked 2022-Jan-18 at 05:41Ruby 2.7.4 Rails 6.1.4.1
note: in package.json
the engines
key is missing in my app
Heroku fails during build with this error
this commit is an empty commit on top of exactly a SHA that I was successful at pushing yesterday (I've checked twice now) so I suspect this is a platform problem or somehow the node-sass got deprecated or yanked yesterday?
how can I fix this?
1remote:
2remote: ERROR in ./app/javascript/require_bootstrap.scss
3remote: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
4remote: ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
5**remote: Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (93)**
6remote: For more information on which environments are supported please see:
7remote: https://github.com/sass/node-sass/releases/tag/v4.14.1
8remote: at module.exports (/tmp/build_1c436dcf/node_modules/node-sass/lib/binding.js:13:13)
9remote: at Object.<anonymous> (/tmp/build_1c436dcf/node_modules/node-sass/lib/index.js:14:35)
10remote: at Module._compile (/tmp/build_1c436dcf/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
11remote: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
12
13
ANSWER
Answered 2022-Jan-06 at 18:23Heroku switched the default Node from 14 to 16 in Dec 2021 for the Ruby buildpack .
Heroku updated the heroku/ruby
buildpack Node version from Node 14 to Node 16 (see https://devcenter.heroku.com/changelog-items/2306) which is not compatible with the version of Node Sass locked in at the Webpack version you're likely using.
To fix it do these two things:
- Specify the 14.x Node version in
package.json
.
1remote:
2remote: ERROR in ./app/javascript/require_bootstrap.scss
3remote: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
4remote: ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
5**remote: Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (93)**
6remote: For more information on which environments are supported please see:
7remote: https://github.com/sass/node-sass/releases/tag/v4.14.1
8remote: at module.exports (/tmp/build_1c436dcf/node_modules/node-sass/lib/binding.js:13:13)
9remote: at Object.<anonymous> (/tmp/build_1c436dcf/node_modules/node-sass/lib/index.js:14:35)
10remote: at Module._compile (/tmp/build_1c436dcf/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
11remote: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
12
13# In package.json
14{
15 # ...
16 "engines": {
17 "node": "14.x"
18 },
19 # ...
20}
21
- Add the
heroku/nodejs
buildpack before theheroku/ruby
buildpack. You can do this in the web interface or with the command line. Here is the command for the CLI:
1remote:
2remote: ERROR in ./app/javascript/require_bootstrap.scss
3remote: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
4remote: ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
5**remote: Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (93)**
6remote: For more information on which environments are supported please see:
7remote: https://github.com/sass/node-sass/releases/tag/v4.14.1
8remote: at module.exports (/tmp/build_1c436dcf/node_modules/node-sass/lib/binding.js:13:13)
9remote: at Object.<anonymous> (/tmp/build_1c436dcf/node_modules/node-sass/lib/index.js:14:35)
10remote: at Module._compile (/tmp/build_1c436dcf/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
11remote: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
12
13# In package.json
14{
15 # ...
16 "engines": {
17 "node": "14.x"
18 },
19 # ...
20}
21$ heroku buildpacks:add heroku/nodejs -i 1 -a YOUR-APP-NAME
22
With the NodeJS buildpack running first, it will look at the package.json
file and respect that when choosing which version of Node to install. Then the Ruby buildpack will run and since a version of Node already exists it will just use that and everything should work as before.
QUESTION
refusing to allow a Personal Access Token to create or update workflow
Asked 2022-Jan-04 at 10:12Today when I added a workflow and push the code to GitHub remote repo, shows this error:
1refusing to allow a Personal Access Token to create or update workflow
2
This is the full error output:
1refusing to allow a Personal Access Token to create or update workflow
2~/Documents/GitHub/flutter-netease-music on master ⌚ 12:25:13
3$ git push origin master ‹ruby-2.7.2›
4Username for 'https://github.com': username
5Password for 'https://jiangxiaoqiang@github.com':
6Enumerating objects: 19, done.
7Counting objects: 100% (19/19), done.
8Delta compression using up to 12 threads
9Compressing objects: 100% (11/11), done.
10Writing objects: 100% (13/13), 1.86 KiB | 1.86 MiB/s, done.
11Total 13 (delta 6), reused 0 (delta 0), pack-reused 0
12remote: Resolving deltas: 100% (6/6), completed with 4 local objects.
13To https://github.com/jiangxiaoqiang/flutter-netease-music.git
14 ! [remote rejected] master -> master (refusing to allow a Personal Access Token to create or update workflow `.github/workflows/main-ios.yml` without `workflow` scope)
15error: failed to push some refs to 'https://github.com/jiangxiaoqiang/flutter-netease-music.git'
16(base)
17
I am auth with token and have privillege to modify the repo. Now I could not push using password. When I try to use my password, the error message is:
1refusing to allow a Personal Access Token to create or update workflow
2~/Documents/GitHub/flutter-netease-music on master ⌚ 12:25:13
3$ git push origin master ‹ruby-2.7.2›
4Username for 'https://github.com': username
5Password for 'https://jiangxiaoqiang@github.com':
6Enumerating objects: 19, done.
7Counting objects: 100% (19/19), done.
8Delta compression using up to 12 threads
9Compressing objects: 100% (11/11), done.
10Writing objects: 100% (13/13), 1.86 KiB | 1.86 MiB/s, done.
11Total 13 (delta 6), reused 0 (delta 0), pack-reused 0
12remote: Resolving deltas: 100% (6/6), completed with 4 local objects.
13To https://github.com/jiangxiaoqiang/flutter-netease-music.git
14 ! [remote rejected] master -> master (refusing to allow a Personal Access Token to create or update workflow `.github/workflows/main-ios.yml` without `workflow` scope)
15error: failed to push some refs to 'https://github.com/jiangxiaoqiang/flutter-netease-music.git'
16(base)
17~/Documents/GitHub/flutter-netease-music on master ⌚ 12:28:37
18$ git push origin master ‹ruby-2.7.2›
19Username for 'https://github.com': username
20Password for 'https://jiangxiaoqiang@github.com':
21remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
22remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
23fatal: unable to access 'https://github.com/jiangxiaoqiang/flutter-netease-music.git/': The requested URL returned error: 403
24(base)
25
Why would this happen and what should I do to fix it?
Community Discussions contain sources that include Stack Exchange Network