Dockerの外でやらないといけない感じなのかな?
git clone https://github.com/rbenv/rbenv.git ~/.rbenvpro
cd ~/.rbenv && src/configure && make -C src
cat << _END > ~/.bashrc
PATH=$HOME/.rbenv/bin:$PATH
eval "$(rbenv init -)"
_END
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install 2.4.2
gem install bundler
.travis.yml
を見ながらやってみよう
https://github.com/nodesource/distributions#installation-instructions
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
https://yarnpkg.com/en/docs/install#linux-tab
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get install -y yarn
sudo apt update
sudo apt install redis-server postgresql imagemagick ffmpeg libicu-dev libidn11 libidn11-dev libpq-dev libxdamage1 libxfixes3 libpam0g-dev
Ubuntu-22.04の場合には、libidn11
とlibidn11-dev
の代わりに、libidn12
とlibidn-dev
をインストールします。
sudo -u postgres psql
> create role zunda with createdb login;
git clean -dxf
export RAILS_ENV=test
export NODE_OPTIONS=--openssl-legacy-provider
bundle install --path=vendor/bundle --with pam_authentication --without development production
yarn install --pure-lockfile
時々データベースのドロップが必要なのかも…
bundle exec rake db:drop
for i in 2 3 4; do bundle exec rake db:drop TEST_ENV_NUMBER=$i; done
データベースとアセットの用意
bundle exec rails db:setup
bundle exec rails assets:precompile
bundle exec rspec
bundle exec rake spec
はruby-2.6.0だといろいろ落ちる