Hey Eugeniu, When I encounter issues like this, I'll first try and eliminate Capistrano as the cause. Log into the server as your deploy user, and navigate to the releases directory (something like /home/user/rtms/releases/<timestamp>). Then run bundle install. If it fails, this is a Bundler issue and has nothing to do with Capistrano.
~William Johnston On Fri, Oct 7, 2016 at 8:52 AM, Eugeniu Tambur <eugeniu....@gmail.com> wrote: > Versions: > > Ruby 2.3.1 > Capistrano 3.6.1 > Rake / Rails / etc > > Platform: > > Working on Windows 8.1 x64 > Deploying to.Ubuntu 16.04 > > Logs: > > > 00:14 bundler:install > 01 ~/.rvm/bin/rvm default do bundle install --path > /home/user/rtms/shared/bundle --binstubs /home/user/rtms/shared/bin > --without development test cucumber deploy --deployment … > > 01 Could not fetch specs from https://rubygems.org/ > cap aborted! > SSHKit::Runner::ExecuteError: Exception while executing as u...@xx.xx.xx.xx: > Exception while executing as u...@xx.xx.xx.xx: bundle exit status: 17 > bundle stdout: Could not fetch specs from https://rubygems.org/ > bundle stderr: Nothing written > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sshkit-1.11.3/lib/sshkit/runners/parallel.rb:15:in > `rescue in block (2 levels) in execute' > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sshkit-1.11.3/lib/sshkit/runners/parallel.rb:11:in > `block (2 levels) in execute' > SSHKit::Runner::ExecuteError: Exception while executing as u...@xx.xx.xx.xx: > bundle exit status: 17 > bundle stdout: Could not fetch specs from https://rubygems.org/ > bundle stderr: Nothing written > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sshkit-1.11.3/lib/sshkit/runners/parallel.rb:15:in > `rescue in block (2 levels) in execute' > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sshkit-1.11.3/lib/sshkit/runners/parallel.rb:11:in > `block (2 levels) in execute' > SSHKit::Command::Failed: bundle exit status: 17 > bundle stdout: Could not fetch specs from https://rubygems.org/ > bundle stderr: Nothing written > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sshkit-1.11.3/lib/sshkit/command.rb:100:in > `exit_status=' > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sshkit-1.11.3/lib/sshkit/backends/netssh.rb:148:in > `execute_command' > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sshkit-1.11.3/lib/sshkit/backends/abstract.rb:141:in > `block in create_command_and_execute' > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sshkit-1.11.3/lib/sshkit/backends/abstract.rb:141:in > `tap' > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sshkit-1.11.3/lib/sshkit/backends/abstract.rb:141:in > `create_command_and_execute' > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sshkit-1.11.3/lib/sshkit/backends/abstract.rb:74:in > `execute' > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/capistrano-bundler-1.2.0/lib/capistrano/tasks/bundler.cap:36:in > `block (5 levels) in <top (required)>' > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sshkit-1.11.3/lib/sshkit/backends/abstract.rb:93:in > `with' > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/capistrano-bundler-1.2.0/lib/capistrano/tasks/bundler.cap:27:in > `block (4 levels) in <top (required)>' > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sshkit-1.11.3/lib/sshkit/backends/abstract.rb:85:in > `within' > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/capistrano-bundler-1.2.0/lib/capistrano/tasks/bundler.cap:26:in > `block (3 levels) in <top (required)>' > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sshkit-1.11.3/lib/sshkit/backends/abstract.rb:29:in > `instance_exec' > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sshkit-1.11.3/lib/sshkit/backends/abstract.rb:29:in > `run' > C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sshkit-1.11.3/lib/sshkit/runners/parallel.rb:12:in > `block (2 levels) in execute' > Tasks: TOP => deploy:initial > The deploy has failed with an error: Exception while executing as > u...@xx.xx.xx.xx: Exception while executing as u...@xx.xx.xx.xx: bundle exit > status: 17 > bundle stdout: Could not fetch specs from https://rubygems.org/ > bundle stderr: Nothing written > ** Invoke deploy:failed (first_time) > ** Execute deploy:failed > > > ** DEPLOY FAILED > ** Refer to log/capistrano.log for details. Here are the last 20 lines: > > > * net-scp (1.2.1) > > DEBUG [cc59676e] * sshkit (1.11.3) > > * airbrussh (1.1.1) > > DEBUG [cc59676e] * capistrano-harrow (0.5.3) > > DEBUG [cc59676e] * capistrano (3.6.1) > > * capistrano-bundler (1.2.0) > > * capistrano-rails (1.1.8) > > DEBUG [cc59676e] * capistrano-rvm (0.1.2) > > DEBUG [cc59676e] * capistrano-upload-config (0.7.0) > > DEBUG [cc59676e] * capistrano3-nginx (2.1.5) > > DEBUG [cc59676e] * capistrano3-puma (1.2.1) > > * xpath (2.0.0) > > DEBUG [cc59676e] * capybara (2.10.0) > > DEBUG [cc59676e] * database_cleaner (1.5.3) > > DEBUG [cc59676e] * shoulda-matchers (3.1.1) > > Install missing gems with `bundle install` > > DEBUG [cc59676e] Finished in 1.306 seconds with exit status 1 (failed). > > INFO [e2042204] Running ~/.rvm/bin/rvm default do bundle install --path > /home/user/rtms/shared/bundle --binstubs /home/user/rtms/shared/bin > --without development test cucumber deploy --deployment --quiet as > u...@xx.xx.xx.xx > > DEBUG [e2042204] Command: cd /home/user/rtms/releases/20161007133640 && ( > export RVM_BIN_PATH="~/.rvm/bin" ; ~/.rvm/bin/rvm default do bundle install > --path /home/user/rtms/shared/bundle --binstubs /home/user/rtms/shared/bin > --without development test cucumber deploy --deployment --quiet ) > > DEBUG [e2042204] Could not fetch specs from https://rubygems.org/ > > Cap file: > > # Load DSL and set up stages > require "capistrano/setup" > > # Include default deployment tasks > require "capistrano/deploy" > > # Include tasks from other gems included in your Gemfile > # > # For documentation on these, see for example: > # > # https://github.com/capistrano/rvm > # https://github.com/capistrano/rbenv > # https://github.com/capistrano/chruby > # https://github.com/capistrano/bundler > # https://github.com/capistrano/rails > # https://github.com/capistrano/passenger > # > require 'capistrano/rvm' > require 'capistrano/bundler' > require 'capistrano/rails' > > require 'capistrano/rails/assets' > require 'capistrano/rails/migrations' > require 'capistrano/puma' > > # Load custom tasks from `lib/capistrano/tasks` if you have any defined > Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r } > > Deploy: > > # require 'bundler/capistrano' > > # config valid only for current version of Capistrano > lock '3.6.1' > > # config valid only for current version of Capistrano > > set :repo_url, 'g...@gitlab.gitdomain.lv:GGG/GGG.git' > set :application, 'ggg' > set :local_user, 'user' > set :user, 'user' > set :puma_threads, [4, 16] > set :puma_workers, 8 > > set :scm_verbose, true > set :bundle_binstubs, -> { shared_path.join('bin') } > > # Don't change these unless you know what you're doing > > set :pty, true > set :use_sudo, false > set :stage, :production > set :branch, :production > #set :deploy_via, :remote_cache > set :deploy_to, "/home/#{fetch(:user)}/#{fetch(:application)}" > set :puma_bind, > "unix://#{shared_path}/tmp/sockets/#{fetch(:application)}-puma.sock" > set :puma_state, "#{shared_path}/tmp/pids/puma.state" > set :puma_pid, "#{shared_path}/tmp/pids/puma.pid" > set :puma_access_log, "#{release_path}/log/puma.error.log" > set :puma_error_log, "#{release_path}/log/puma.access.log" > set :bundle_path, -> { shared_path.join('bundle') } > set :default_env, { rvm_bin_path: '~/.rvm/bin' } > #set :ssh_options, { forward_agent: true, user: fetch(:user), keys: > %w(~/.ssh/id_rsa.pub) } > #set :ssh_options, { forward_agent: true, user: fetch(:user), keys: > ["#{ENV['USERPROFILE']}/.ssh/key.id_rsa"] } > set :puma_preload_app, true > set :puma_worker_timeout, nil > set :puma_init_active_record, true # Change to false when not using > ActiveRecord > #set :bundle_without, %w{development test}.join(' ') > > > ## Defaults: > > > set :scm, :git > > # set :branch, :master > > # set :format, :pretty > > set :log_level, :debug > > set :keep_releases, 5 > > > ## Linked Files & Directories (Default None): > > set :linked_files, %w{config/database.yml config/secrets.yml} > set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle > public/system public/uploads} > > namespace :puma do > desc 'Create Directories for Puma Pids and Socket' > task :make_dirs do > on roles(:app) do > execute "mkdir #{shared_path}/tmp/sockets -p" > execute "mkdir #{shared_path}/tmp/pids -p" > end > end > > before :start, :make_dirs > end > > namespace :deploy do > desc "Make sure local git is in sync with remote." > task :check_revision do > on roles(:app) do > unless `git rev-parse HEAD` == `git rev-parse origin/production` > puts "WARNING: HEAD is not the same as origin/production" > puts "Run `git push` to sync changes." > exit > end > end > end > > desc 'Initial Deploy' > task :initial do > on roles(:app) do > before 'deploy:restart', 'puma:start' > invoke 'deploy' > end > end > > desc 'Restart application' > task :restart do > on roles(:app), in: :sequence, wait: 5 do > invoke 'puma:restart' > end > end > > desc 'Upload to shared/config' > task :upload do > on roles (:app) do > upload! "shared/config/database.yml", > "#{shared_path}/config/database.yml" > upload! "shared/config/secrets.yml", > "#{shared_path}/config/secrets.yml" > end > end > > before :starting, :check_revision > after :finishing, :compile_assets > after :finishing, :cleanup > after :finishing, :restart > end > > desc "Run rake db:seed on a remote server." > task :seed do > on roles (:app) do > within release_path do > with rails_env: fetch(:rails_env) do > execute :rake, "db:seed" > end > end > end > end > > > I Can isntall gem on the server with bundle and with gem isntall, but still > get this error. > > PLEASE HELP !!! :) > > -- > You received this message because you are subscribed to the Google Groups > "Capistrano" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to capistrano+unsubscr...@googlegroups.com. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/capistrano/174c8c47-667b-41c2-8d41-92b043d89422%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Capistrano" group. To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+unsubscr...@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/CAJBYiQj%2BUS6FA20qfgVNBTtZn3jT5WtuygYiYn4VOT2uhSVzkg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.