This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# On Jan 23 2024, I had a very difficult time installing ruby 2.5.9 on my Manjaro Linux system using rbenv. | |
# I already had openssl 1.1 installed, yet I had difficulty getting rbenv to use the correct openssl. | |
# I also installed the latest version of ruby-build which did not seem to help | |
# This is what helped. I created a shell script with the following content, did chmod u+x and ran it: | |
# This was adapted from here for my Linux system: https://github.com/rbenv/ruby-build/issues/1691#issuecomment-777102931 | |
export LDFLAGS="-L/lib/openssl-1.1" | |
export CPPFLAGS="-L/lib/openssl-1.1" | |
export PKG_CONFIG_PATH="/lib/openssl-1.1/pkgconfig" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Some helpfuld sed commands for upgrading from Rails 2.3.18 to Rails 3.0.0. | |
# Not a complete list | |
# Written for OSX. | |
# Changelog: | |
# 2019/12/19: Initial commit | |
# DEPRECATED ENV VARS | |
sed -i '' -E "s|RAILS_ROOT|Rails.root.to_s|" app/**/*rb | |
sed -i '' -E "s|RAILS_ROOT|Rails.root.to_s|" config/*rb | |
sed -i '' -E "s|RAILS_ENV|Rails.env|" lib/**/*rake |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Backup the database" | |
namespace :db do | |
task :backup do | |
on roles(:db) do |host| | |
backup_path = "#{fetch(:deploy_to)}/backups" | |
execute :mkdir, "-p #{backup_path}" | |
basename = 'database' | |
username, password, database, host = get_remote_database_config(fetch(:stage)) | |
debug "#{username}, #{password}, #{database}" |