Installing mysql2
gem errors on Apple silicon M1, M2 or M3 Mac running macOS Sonoma.
Make sure mysql-client
, openssl
and zstd
are installed on Mac via Homebrew.
Replace
mysql-client
with whichever mysql package you are using
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG | |
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT. | |
# | |
# | |
# Libraries and infrastructure | |
sudo apt update -y | |
sudo apt install -y \ | |
docker.io docker-buildx \ | |
build-essential pkg-config autoconf bison rustc cargo clang \ |
<div data-controller="smart-scroll" | |
data-action="smart-scroll:added->smart-scroll#handleAdded | |
resize->smart-scroll#handleAdded | |
scroll->smart-scroll#handleScroll"> | |
<div data-controller="smart-scroll-item"> | |
aya: an an | |
</div> | |
<div data-controller="smart-scroll-item"> | |
hatate: ni hao | |
</div> |
gem install synvert | |
synvert --sync | |
synvert -r ruby/new_hash_syntax $PROJECT_PATH | |
synvert -r ruby/new_lambda_syntax $PROJECT_PATH |
Download the certificate with: | |
`wget -O config/rds-combined-ca-bundle.pem http://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem` | |
Then connect with: | |
`postgres://user:password@amazon-host/db_name?sslmode=require&sslrootcert=config/rds-combined-ca-bundle.pem` | |
References: | |
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL | |
https://github.com/jeremyevans/sequel/issues/897 | |
http://www.postgresql.org/docs/9.3/static/libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT | |
http://dba.stackexchange.com/questions/77811/how-to-connect-to-an-amazon-postgresql-database-using-ssl |
# config/routes.rb | |
resources :documents do | |
scope module: 'documents' do | |
resources :versions do | |
post :restore, on: :member | |
end | |
resource :lock | |
end | |
end |
ActiveSupport::Notifications.subscribe('deprecation.rails') do |name, start, finish, id, payload| | |
Honeybadger.notify( | |
error_class: "DEPRECATION WARNING", | |
error_message: payload[:message], | |
backtrace: payload[:callstack] | |
) | |
end |
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf
using homebrew.
class BootstrapFormBuilder < ActionView::Helpers::FormBuilder | |
delegate :capture, :content_tag, :tag, to: :@template | |
%w[text_field text_area password_field collection_select].each do |method_name| | |
define_method(method_name) do |name, *args| | |
errors = object.errors[name].any?? " error" : "" | |
error_msg = object.errors[name].any?? content_tag(:span, object.errors[name].join(","), class: "help-inline") : "" | |
content_tag :div, class: "clearfix#{errors}" do |