[EC2/Vue/Rails] Vue+Rails의 EC2 디버깅 프로그램
4248 단어 AWSJavaScriptRailsvuejstech
카탈로그
Ruby 설치
◆rbenv/ruby-build 설치
$ git clone git://github.com/rbenv/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
$ source ~/.bashrc
$ git clone git://github.com/rbenv/ruby-build.git /tmp/ruby-build
$ cd /tmp/ruby-build
$ sudo ./install.sh
◆ 지정 루비 버전
$ rbenv install -l
$ sudo yum -y install gcc-c++ glibc-headers openssl-devel readline libyaml-devel readline-devel zlib zlib-devel libffi-devel libxml2 libxslt libxml2-devel libxslt-devel sqlite-devel
$ rbenv install 2.7.1
$ rbenv rehash
$ rbenv global 2.7.1
$ ruby -v
◆bundler/rails 설치
$ rbenv rehash
$ gem install bundler
$ bundler -v
$ gem install rails -v 6.0.2.1
$ rails -v
Node.js 설치
$ git clone https://github.com/creationix/nvm.git ~/.nvm
$ source ~/.nvm/nvm.sh
$ vim .bash_profile
###追記
if [ -f ~/.nvm/nvm.sh ]; then
. ~/.nvm/nvm.sh
fi
$ nvm install 12.14.0
$ node --version
$ npm --version
$ npm install yarn -g
$ yarn --version
Vue.js 설치
$ rails webpacker:install:vue
$ npm install vue-router
$ npm install -y vuex
$ npm install axios --save
$ npm install vee-validate --save
$ npm install sass-loader node-sass --save-dev
$ npm install --save-dev core-js@3
$ npm install --save vuex-persistedstate
오류 처리
◆sassc 오류
//対処法
$ yum update & yum install gcc gcc-c++ make
◆ sqlite3 오류
$ wget https://www.sqlite.org/2019/sqlite-autoconf-3300100.tar.gz
$ tar xzvf sqlite-autoconf-3300100.tar.gz
$ cd sqlite-autoconf-3300100/
$ ./configure --prefix=/opt/sqlite/sqlite3
$ make
$ sudo yum install sqlite-devel
$ sudo make install
$ /opt/sqlite/sqlite3/bin/sqlite3 --version
$ gem install sqlite3 -- --with-sqlite3-include=/opt/sqlite/sqlite3/include --with-sqlite3-lib=/opt/sqlite/sqlite3/lib
◆ SQLite (3.7.17) is too old
//対処法
$ wget https://kojipkgs.fedoraproject.org//packages/sqlite/3.8.11/1.fc21/x86_64/sqlite-devel-3.8.11-1.fc21.x86_64.rpm
$ wget https://kojipkgs.fedoraproject.org//packages/sqlite/3.8.11/1.fc21/x86_64/sqlite-3.8.11-1.fc21.x86_64.rpm
$ sudo yum install sqlite-3.8.11-1.fc21.x86_64.rpm sqlite-devel-3.8.11-1.fc21.x86_64.rpm
$ yum list | grep sqlite
◆ mysql2 오류
$ sudo yum install mysql-devel
$ bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib"
$ bundle install
◆Development Tools 오류
対処法
$ yum -y groupinstall "Development Tools"
$ yum -y install gcc-c++ glibc-headers openssl-devel readline libyaml-devel zlib zlib-devel libffi-devel libxml2 libxslt libxml2-devel libxslt-devel mysql-devel readline-devel
◆ ImageMagick 오류
対処法
$ yum -y install ImageMagick ImageMagick-devel
//gccダウングレード
$ yum install gcc44
$ alternatives --set gcc /usr/bin/gcc44
참고 문헌
Reference
이 문제에 관하여([EC2/Vue/Rails] Vue+Rails의 EC2 디버깅 프로그램), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://zenn.dev/endo/articles/049d3a83b18037cc74d9텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)