I'm a beginner and what is WSL? ?? It was a level that started from, but I managed to prepare the environment so I will leave it as a memorandum for latecomers This time, the goal was to prepare the rails environment using WSL called ubuntu. The errors that were difficult for me as a beginner are as follows.
Since I don't know right or left, I investigated the installation method and arrived at the following site. https://railsgirls.jp/install#setup_for_windows_without_wsl Since step 1 was only installation, I proceeded quickly, and while I was wondering if the environment maintenance would be completed soon, I stumbled on the 4th step of step 2. Specifically
rbenv install 2.7.0
I stumbled on it. INSTALL FILLED is displayed and you can see that an error-like event has occurred. As I investigated, I found that the package was missing, and when I ran the following code, I was able to solve it.
sudo apt-get install git-core zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn
I had a hard time overcoming rbenv install 2.7.0 and rails, and I thought it would end, but life doesn't go well. The goal was just around the corner, but an error appeared on the screen again. I can't find the webpacker. Therefore
rails webpacker install
I get an error again when I run. .. ..
bin/rails:3:in `load'
bin/rails:3:in `<main>'
(See full trace by running task with --trace)
Something is wrong with the file to install rails webpacker install. Then, when I investigated further, it was said that it was necessary to install it with something called yarn installed.
# Node.install js
sudo apt install -y nodejs npm
sudo npm install n -g
sudo n stable
sudo apt purge -y nodejs npm
exec $SHELL -l
#install yarn
rails yarn install
#install webpacker
rails webpacker install
The error could be resolved by
It seems easy to write so far, but it takes a week to solve these two problems. How difficult it was for a beginner who didn't know anything to understand and find out what was required from the error statement and enter the appropriate command. .. .. I would like to continue to improve my problem-solving ability by learning from this error. .. ..
Recommended Posts