-** Ruby installation ** -** Node.js installation ** -** Vue.js installation ** -** Error && Action **
$ 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
$ rbenv rehash
$ gem install bundler
$ bundler -v
$ gem install rails -v 6.0.2.1
$ rails -v
$ git clone https://github.com/creationix/nvm.git ~/.nvm
$ source ~/.nvm/nvm.sh
$ vim .bash_profile
###Postscript
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
$ 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
//approach
$ yum update & yum install gcc gcc-c++ make
$ 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
//approach
$ 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
$ sudo yum install mysql-devel
$ bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib"
$ bundle install
approach
$ 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
approach
$ yum -y install ImageMagick ImageMagick-devel
//gcc downgrade
$ yum install gcc44
$ alternatives --set gcc /usr/bin/gcc44
-(Deployment ①) The most polite AWS commentary in the world. Until you bring your Rails app to AWS using EC2 -Install Ruby on EC2 (Amazon Linux2) 2020 -Building a Ruby environment on an EC2 server -Run Rails 6.0 with SQLite3 (> = 3.8) in CentOS environment -I get an error when I try to put mysql2 on Amazon Linux
Recommended Posts