0
0

More than 3 years have passed since last update.

Heroku デプロイできない時の解決方法

Last updated at Posted at 2021-04-05

まずWindowsであれば,
Herokuで必要なgemが足りていないので、
ターミナルで以下を実行する。

bundle lock --add-platform ruby
git add .
git commit -m "any message"

これでも解決しない場合、
以下のようなエラーが出ていたら、

cannot load such file -- bootsnap/setup (LoadError)
cannot load such file -- rake (LoadError)

ターミナルで以下を実行して、gemをインストールする。

bundle install

これでもダメな場合は、
ターミナルで以下を実行してnodeのバージョンを確かめる。

node -v

nodeが15以上になっていたら、
nodeを14に下げてから再度Herokuにpushする。

<nodeを14に下げる方法>
ターミナルで以下を実行

brew install nodebrew
/home/linuxbrew/.linuxbrew/opt/nodebrew/bin/nodebrew setup_dirs
nodebrew install 14
nodebrew use 14
echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.profile
source ~/.profile
node -v
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0