Installing mysql2 gem errors on MacOS Catalina with MySQL 5.7.
Make sure openssl is installed on Mac via Homebrew.
brew install openssl
| class CreateGadgets < ActiveRecord::Migration | |
| def change | |
| create_table "gadgets" do |t| | |
| t.json "info" | |
| end | |
| end | |
| end |
| require 'rails_helper' | |
| RSpec.describe TodosController, :type => :controller do | |
| describe "GET #index" do | |
| #describe "POST #create" do | |
| #describe "GET #show" do | |
| #describe "PATCH #update" do (or PUT #update) | |
| #describe "DELETE #destroy" do | |
| #describe "GET #new" do |
| # This is a skeleton for testing models including examples of validations, callbacks, | |
| # scopes, instance & class methods, associations, and more. | |
| # Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
| # | |
| # I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
| # so if you have any, please share! | |
| # | |
| # This skeleton also assumes you're using the following gems: | |
| # | |
| # rspec-rails: https://github.com/rspec/rspec-rails |
| 1.upto(Resque::Failure.count) do |i| | |
| job = Resque::Failure.all(i) | |
| # inspect failed job | |
| args = job['payload']['args'] | |
| klass = job['payload']['class'] | |
| end |
| index = 0 | |
| str.each_char do |char| | |
| index += 1 | |
| unless char.ascii_only? | |
| puts "char at #{index} == ***#{char.inspect}***" | |
| puts str.slice(index - 10, 20) | |
| end | |
| end |