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
https:// { | |
log | |
tls internal { | |
on_demand | |
} | |
reverse_proxy :3000 | |
} |
#!/bin/bash | |
OPENAI_API_KEY="YOUR_API_KEY" | |
CONVERSATION="/tmp/$(cat /proc/sys/kernel/random/uuid)" | |
query_open_ai() { | |
curl -s https://api.openai.com/v1/chat/completions \ | |
-H "Content-Type: application/json" \ | |
-H "Authorization: Bearer $OPENAI_API_KEY" \ | |
-d "{ |
# set ruby/rails version | |
export DOCKER_RAILS_VERSION="7.0.1" | |
export DOCKER_RUBY_VERSION="3.1.0" | |
export RAILS_PROJECT_NAME="rails7" | |
# create folder for the project and add Gemfile with necessary rails version | |
mkdir "$RAILS_PROJECT_NAME" | |
cd "$RAILS_PROJECT_NAME" | |
echo "ruby '$DOCKER_RUBY_VERSION' | |
source 'https://rubygems.org' | |
gem 'rails', '$DOCKER_RAILS_VERSION'" > Gemfile |
I was able to get Ruby 2.5.1 building on M1 by following two of the steps in that GH issue...
rbenv/ruby-build#1691 (comment) rbenv/ruby-build#1691 (comment)
I installed readline
and openssl
with standard brew install
.
brew install readline
brew install openssl
This is just some code I recently used in my development application in order to add token-based authentication for my api-only rails app. The api-client was to be consumed by a mobile application, so I needed an authentication solution that would keep the user logged in indefinetly and the only way to do this was either using refresh tokens or sliding sessions.
I also needed a way to both blacklist and whitelist tokens based on a unique identifier (jti)
Before trying it out DIY, I considered using:
... | |
## | |
# Until this commit is merged and released by rack | |
# | |
gem 'rack', git: 'https://github.com/rack/rack.git', ref: 'c859bbf7b53cb59df1837612a8c330dfb4147392' | |
... |
All code is available in example app - https://github.com/maxivak/webpacker-rails-example-app
On OS/X Sierra, after recently running a brew update
I started receiving the error message Sorry, you can't use byebug without Readline
when trying to run some rake tasks in my ruby project folder. I observed this in projects and gems that include byebug
or pry
in their Gemfile
or gem.spec
. I've found in my googling that many begin encountering this error message after running a brew update
but there are other triggering conditions as well.
>> rake aws:show_config
WARN: Unresolved specs during Gem::Specification.reset:
mime-types (>= 0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Sorry, you can't use byebug without Readline. To solve this, you need to
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
git clone --bare [email protected]:usi-systems/easytrace.git