- Ruby
- MySQL
- RMagick (libmagickcore-dev)
- Bundler
- Yarn
You can use rbenv to insatall Ruby.
The Ruby version is designated in Gemfile and .ruby-version.
$ cat .ruby-version
$ ruby -v$ mysql --version
$ mysql -u root$ sudo apt install libmagickcore-devcp .env{.sample,}
vim .env$ gem install bundler
$ bundle install
$ yarn install$ bundle exec rails db:create
$ bundle exec rails db:migrate
$ bundle exec rails db:seed$ bundle exec rails serverPlace images to public/images/.
$ ls seeds.csv
$ ls public/images/*.png
$ bundle exec rake seeder:seedTo deploy image files to the server, use rsync command:
# Direct transfer to server
rsync -avz --progress public/images/ [SSH_CONFIG_NAME]:/path/to/server/images/
# Example (replace with your actual SSH config name and server path)
rsync -avz --progress public/images/ your-server:/var/www/whiteless_works/public/images/Note:
- Replace
[SSH_CONFIG_NAME]with your SSH configuration name - Replace
/path/to/server/images/with the actual server path - Ensure you have write permissions to the target directory on the server
- The
-aflag preserves permissions, timestamps, and directory structure - The
-zflag compresses data during transfer - The
--progressflag shows transfer progress
Ruby 3.4.4 を rbenv でインストールするには libffi-dev と libyaml-dev が追加で必要っぽい。
sudo apt install -y build-essential libssl-dev zlib1g-dev libffi-dev libyaml-dev
インストール時に出たエラー
pkg_config: checking for pkg-config for yaml-0.1... -------------------- not found
LD_LIBRARY_PATH=.:../.. ASAN_OPTIONS=detect_leaks=0 pkg-config --exists yaml-0.1
package configuration for yaml-0.1 is not found
--------------------
find_header: checking for yaml.h... -------------------- no
conftest.c:3:10: fatal error: yaml.h: No such file or directory
3 | #include <yaml.h>
| ^~~~~~~~
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <yaml.h>
/* end */
--------------------
まず、パスワード無しで MySQL にログインし、
sudo mysql -u rootその後、パスワードを設定してください。今回は caching_sha2_password を指定しています。
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'your_new_password';
FLUSH PRIVILEGES;パスワードを設定したら、 .env ファイルを更新してください。
cp -i .env{.sample,}
vim .env.env ファイルには以下のように記述してください:
export WHITELESS_WORKS_DATABASE_PASSWORD=your_new_password初回デプロイ時は master.key 及び config/credentials.yml.enc を作成してください。
EDITOR=vim bundle exec rails credentials:edit
Important: This repository contains seed values related to creative content and visual artworks that are currently unlicensed. Therefore, I cannot accept pull requests at this time.
If you're interested in contributing or have suggestions, please contact me directly to discuss possibilities.