start new:
tmux
start new with session name:
tmux new -s myname
#config/initializers/carrierwave.rb | |
module CarrierWave | |
module MiniMagick | |
# Rotates the image based on the EXIF Orientation | |
def exif_rotation | |
manipulate! do |img| | |
img.auto_orient | |
img = yield(img) if block_given? | |
img | |
end |
This gist is the update of this post https://u.osu.edu/hasnan.1/2014/03/30/rails-4-multiple-file-upload-with-carrierwave-nested-form-and-jquery-file-upload/ | |
License MIT |
class Category < ApplicationRecord | |
has_many :types | |
end | |
class Type < ApplicationRecord | |
belongs_to :category | |
end | |
# Admin DSL. you need to pass the the selected type_id by passing the form object value. | |
f.input :category |
FROM ruby:3.0.2-alpine | |
ENV ROOT=/var/www/app \ | |
BUNDLE_PATH=/var/www/app/vendor/bundle | |
ENV BUNDLE_BIN=$BUNDLE_PATH/bin | |
ENV PATH $ROOT/bin:$BUNDLE_BIN:$PATH | |
RUN apk update && apk upgrade && apk add --update --no-cache \ | |
build-base \ | |
curl-dev \ |
1. | |
Error: | |
java.io.IOException: java.lang.IllegalArgumentException: bucketId out of range: -1 | |
Solution: | |
set hive.fetch.task.conversion=none; | |
2. | |
Error: | |
java.io.IOException: [Error 30022]: Must use HiveInputFormat to read ACID tables |
# Additional translations at http://github.com/plataformatec/devise/wiki/I18n | |
my: | |
errors: | |
messages: | |
not_found: "Tidak dijumpai" | |
already_confirmed: "Sudah disahkan" | |
not_locked: "Tidak dikunci" | |
devise: |
ERROR | |
dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib | |
FIX | |
brew update && brew install gmp && rvm reinstall 2.2.5 |
1 ) remove /home/deployer/appName/repo | |
2 ) cap production deploy |
# Before | |
CarrierWave.configure do |config| | |
config.storage = :fog | |
config.fog_credentials = { | |
:provider => "AWS", | |
:aws_access_key_id => ENV["S3_KEY"], | |
:aws_secret_access_key => ENV["S3_SECRET"], | |
:region => ENV["S3_REGION"] | |
} | |
config.fog_directory = ENV["S3_BUCKET"] |