Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
I don't like Sprockets, but it's the easiest and best choice for lots of Ruby on Rails projects. When looking for a better way to manage my JavaScript assets and an improved developer story, my current tool of choice is webpack. While I wish Rails supported drop-in asset pipelines the way that Phoenix does, it's not hard to use webpack with Rails.
| # Clone the repository from GitHub | |
| git clone --recursive https://github.com/uglide/RedisDesktopManager.git -b 0.8.0 rdm && cd ./rdm | |
| # Compile the source | |
| cd src/ | |
| ./configure | |
| source /opt/qt56/bin/qt56-env.sh && qmake && make | |
| sudo checkinstall -D --install | |
| sudo gdebi /home/$USER/rdm/src/src_*.deb | |
| cd /usr/share/redis-desktop-manager/bin |
| namespace :paperclip_migration do | |
| desc 'Migrate data' | |
| task :migrate_s3 => :environment do | |
| # Make sure that all of the models have been loaded so any attachments are registered | |
| puts 'Loading models...' | |
| Dir[Rails.root.join('app', 'models', '**/*')].each { |file| File.basename(file, '.rb').camelize.constantize } | |
| # Iterate through all of the registered attachments | |
| puts 'Migrating attachments...' |
| ## | |
| # Use this behind the scenes to migrate files from your filesystem to Amazon S3 | |
| # %: rake paperclip_migration:migrate_to_s3 | |
| ## | |
| namespace :attachments do | |
| desc "migrate files from filesystem to s3" | |
| task :migrate_to_s3 => :environment do | |
| require 'aws/s3' |
| # Example usage: | |
| # | |
| # PaperclipS3Migrator.new( | |
| # [User, BlogPost, Page], | |
| # ':attachment/:id/:style/:filename', | |
| # ':class/:id/:attachment/:style/:updated_at_:filename' | |
| # ).migrate | |
| # | |
| class PaperclipS3Migrator < Struct.new(:klasses, :old_path, :new_path) |
| namespace :attachments do | |
| task migrate_to_s3: :environment do | |
| require 'aws-sdk' | |
| # Define Paperclip models | |
| models = [ | |
| [Attachment, :data], | |
| [Image, :data], | |
| [MediaAppearance, :media_logo], | |
| [Testimonial, :avatar_logo] |
| FROM centos | |
| # ---- setup ssh | |
| RUN yum install -y openssh-server | |
| RUN yum install -y openssh-clients | |
| # RUN sed -ri 's/^#PermitEmptyPasswords no/PermitEmptyPasswords yes/' /etc/ssh/sshd_config | |
| # RUN sed -ri 's/^#PermitRootLogin yes/PermitRootLogin yes/' /etc/ssh/sshd_config | |
| # - WARNING: 'UsePAM no' is not supported in Red Hat Enterprise Linux and may cause several problems. |
| # expected that SL7 is installed as minimal system, vagrant account as administrator, run with sudo privileges | |
| yum groupinstall "X Window System" | |
| yum -y install gnome-classic-session gnome-terminal nautilus-open-terminal control-center dejavu-sans-mono-fonts | |
| systemctl set-default graphical.target | |
| # enable ssh | |
| systemctl enable sshd | |
| yum install -y wget | |
| mkdir -p /home/vagrant/.ssh | |
| chmod 0700 /home/vagrant/.ssh | |
| wget --no-check-certificate \ |
| #!/bin/sh | |
| # PATH TO YOUR HOSTS FILE | |
| ETC_HOSTS=/etc/hosts | |
| # DEFAULT IP FOR HOSTNAME | |
| IP="127.0.0.1" | |
| # Hostname to add/remove. | |
| HOSTNAME=$1 |