Comando bundle no encontrado al implementar la aplicación Rails en aws usando mina

Al implementar mi aplicación de rails usando mina, tengo un error como bash: line 82: bundle: command not found . Busqué en Google pero no pude encontrar ninguna solución. ¿Cómo puedo solucionar esto?

Este es mi deploy.rb

 require 'mina/bundler' require 'mina/rails' require 'mina/git' set :user, 'ubuntu' set :domain, 'www.fuitter.com' set :deploy_to, '/usr/share/nginx/html/fuitter' set :repository, '[email protected]:mc_cannibal/fuitter2.git' set :branch, 'master' set :forward_agent, true set :shanetworking_paths, ['config/database.yml', 'config/secrets.yml', 'log'] task :environment do ruby_version = File.read('.ruby-version').strip raise "Couldn't determine Ruby version: Do you have a file .ruby-version in your project root?" if ruby_version.empty? queue %{ source /etc/profile.d/rvm.sh rvm use #{ruby_version} || exit 1 } end task :setup => :environment do queue! %[mkdir -p "#{deploy_to}/#{shanetworking_path}/log"] queue! %[chmod g+rx,u+rwx "#{deploy_to}/#{shanetworking_path}/log"] queue! %[mkdir -p "#{deploy_to}/#{shanetworking_path}/config"] # Add the repository server to .ssh/known_hosts if repository repo_host = repository.split(%r{@|://}).last.split(%r{:|\/}).first repo_port = /:([0-9]+)/.match(repository) && /:([0-9]+)/.match(repository)[1] || '22' queue! %[ if ! ssh-keygen -H -F #{repo_host} &>/dev/null; then ssh-keyscan -t rsa -p #{repo_port} -H #{repo_host} >> ~/.ssh/known_hosts fi ] end # Create database.yml for Postgres if it doesn't exist path_database_yml = "#{deploy_to}/#{shanetworking_path}/config/database.yml" database_yml = %[production: database: fuitter adapter: postgresql pool: 5 timeout: 5000] queue! %[ test -e #{path_database_yml} || echo "#{database_yml}" > #{path_database_yml} ] # Create secrets.yml if it doesn't exist path_secrets_yml = "#{deploy_to}/#{shanetworking_path}/config/secrets.yml" secret = secrets_yml = %[production: secret_key_base: #{`rake secret`.strip}] queue! %[ test -e #{path_secrets_yml} || echo "#{secrets_yml}" > #{path_secrets_yml} ] queue! %[chmod g+rx,u+rwx,o-rwx "#{deploy_to}/#{shanetworking_path}/config"] end desc "Deploys the current version to the server." task :deploy => :environment do to :before_hook do # Put things to run locally before ssh end deploy do # Put things that will set up an empty directory into a fully set-up # instance of your project. invoke :'git:clone' invoke :'deploy:link_shanetworking_paths' invoke :'bundle:install' invoke :'rails:db_migrate' invoke :'rails:assets_precompile' invoke :'deploy:cleanup' to :launch do #queue "service #{user} restart" end end end 

¿Debo presionar el file deploy.rb en el control de versión? PD: tengo instalado rvm.

Ok, lo he arreglado. Había puesto el path equivocado de rvm. Después de ejecutar which rvm , copié esa ruta y la pegué aquí.

  task :environment do ruby_version = File.read('.ruby-version').strip raise "Couldn't determine Ruby version: Do you have a file .ruby-version in your project root?" if ruby_version.empty? queue %{ source path/to/rvm rvm use #{ruby_version} || exit 1 } end 

Puede invocar el rvm con esta configuration

 task :environment do # If you're using rbenv, use this to load the rbenv environment. # Be sure to commit your .ruby-version or .rbenv-version to your repository. # invoke :'rbenv:load' # For those using RVM, use this to load an RVM [email protected] invoke :'rvm:use', 'ruby-xxx' end