MIQ & RUBY

RVM

  • Install rvm

    1
    2
    3
    
    apt install gnupg2
    gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
    curl -L get.rvm.io | bash -s stable
    
  • Install Ruby by rvm

    1
    2
    3
    4
    
    source /etc/profile.d/rvm.sh
    rvm list known
    rvm requirements
    rvm install 2.5
    

Ruby

MIQ

  • Environment preparation
    • the default version of postgresql is 10
    • repo list of nodejs is put on /etc/apt/sources.list.d/nodesource.list

Postgresql

  • list db and tables

    1
    2
    
    \l
    \dt
    

rake

1
rake -T

ERD

Refer to: Rails ERD

  1. modify Gemfile
1
gem 'rails-erd', group: :development
  1. Add .erdconfig
1
2
3
4
5
6
7
8
only: PhysicalServer,PhysicalSwitch,HostSwitch,Switch,OperatingSystem,Hardware,PhysicalDisk,PhysicalStorage,PhysicalRack,PhysicalChassis,GuestDevice,Firmware,FirmwareBinary,ComputerSystem,Host,ContainerNode,PhysicalNetworkPort
# exclude: Owner,Handler,Backing,Approver,Backing,Target,Taggable,Counterpart,ManagedEntity
# polymorphism: true
# orientation: vertical
indirect: true
inheritance: true
attributes: primary_keys,foreign_keys,inheritance,content
# notation: bachman
comments powered by Disqus