First, add the devise token auth gem to your Gemfile
and run bundle
to install it
gem 'devise_token_auth'
heroku pg:backups:restore production-app-name::b001 DATABASE_URL --app staging-app-name |
git log --graph --oneline --all |
heroku pg:backups capture | |
heroku pg:backups public-url | |
curl "http://[url]" > production.dump | |
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb file.dump |
require 'csv' | |
file = "#{Rails.root}/public/user_data.csv" | |
products = Product.order(:first_name) | |
headers = ["Product ID", "Name", "Price", "Description"] | |
CSV.open(file, 'w', write_headers: true, headers: headers) do |writer| | |
products.each do |product| |
Hello buddy, if you are here, it is probably because you have just acquired a new computer equipped with a new chip from Apple, the M1/M2. Know that in addition to being a marvel of modern technology and engineering, this super machine is also capable of keeping you awake with a multitude of crazy, and sometimes inexplicable, problems that will prevent the correct installation of various software.
This guide assumes that the machine has not yet had any systems installed, and all the steps for installing them will be described here in the order in which they were done by me until I was successful in this endeavor.
This guide also assumes that you’re using zsh
. If not, replace any references to .zshrc
in the steps below with .bash_profile
(if you’re using Bash) or the appropriate shell.
# Article for Dockerfile at ADD_URL_FOR_THIS | |
# We're using the Ruby 2.3.1 base container and extend it | |
FROM ruby:2.3.1 | |
# We install certain OS packages necessary for running our build | |
# Node.js needs to be installed for compiling assets | |
# libpq-dev is necessary for installing the pg gem | |
# libmysqlclient-dev is necessary for installing the mysql2 gem | |
RUN apt-get update && \ | |
apt-get install -yq \ |