Trying to deploy with mina

everyone. I’m trying to deploy my application to my server in DigitalOcean.

If Log in to the server with credentials etc. I run bundle and I also make the application run. but with mina deploy it seems that bundle dont work.

I’m getting this error, that I dont know how to dig more and find whats is happening.

damaral@MacBook-Air-de-Diogo administrativo % mina deploy --verbose
-----> Creating a temporary build path
$ touch "deploy.lock"
$ mkdir -p "$build_path"
$ cd "$build_path"
-----> Fetching new git commits
$ (cd "/home/rails/example/scm" && git fetch "https://github.com/damaral/administrativo.git" "main:main" --force)
Username for 'https://github.com': [email protected]
Password for 'https://[email protected]@github.com': 
-----> Using git branch 'main'
$ git clone "/home/rails/example/scm" . --recursive --branch "main"
Cloning into '.'...
done.
-----> Updating submodules
$ git submodule update
-----> Using this git commit
$ git rev-parse HEAD > .mina_git_revision
$ git --no-pager log --format="%aN (%h):%n> %s" -n 1
Diogo Amaral (eac28ce):
> teste do credentials
$ rm -rf .git
-----> Symlinking shared paths
$ if [ ! -d  "/home/rails/example/shared/vendor/bundle" ]; then
    echo "! ERROR: not set up."
    echo "The directory '/home/rails/example/shared/vendor/bundle' does not exist on the server"
    echo "You may need to run 'mina setup' first"
    exit 18
  fi
$ mkdir -p ./vendor
$ rm -rf "./vendor/bundle"
$ ln -s "/home/rails/example/shared/vendor/bundle" "./vendor/bundle"
$ if [ ! -d  "/home/rails/example/shared/log" ]; then
    echo "! ERROR: not set up."
    echo "The directory '/home/rails/example/shared/log' does not exist on the server"
    echo "You may need to run 'mina setup' first"
    exit 18
  fi
$ mkdir -p .
$ rm -rf "./log"
$ ln -s "/home/rails/example/shared/log" "./log"
$ if [ ! -d  "/home/rails/example/shared/tmp/cache" ]; then
    echo "! ERROR: not set up."
    echo "The directory '/home/rails/example/shared/tmp/cache' does not exist on the server"
    echo "You may need to run 'mina setup' first"
    exit 18
  fi
$ mkdir -p ./tmp
$ rm -rf "./tmp/cache"
$ ln -s "/home/rails/example/shared/tmp/cache" "./tmp/cache"
$ if [ ! -d  "/home/rails/example/shared/public/assets" ]; then
    echo "! ERROR: not set up."
    echo "The directory '/home/rails/example/shared/public/assets' does not exist on the server"
    echo "You may need to run 'mina setup' first"
    exit 18
  fi
$ mkdir -p ./public
$ rm -rf "./public/assets"
$ ln -s "/home/rails/example/shared/public/assets" "./public/assets"
-----> Installing gem dependencies using Bundler
$ bundle install --without development test --path "vendor/bundle" --deployment
bash: line 147: bundle: command not found
! ERROR: Deploy failed.
-----> Cleaning up build
$ rm -rf "$build_path"
Unlinking current
$ rm -f "deploy.lock"
OK
Connection to 123.456.789.000 closed.
 !     Run Error

Does anyone knows how do I solve that? What is happening?
Whats is causing the error?

Leave a Comment