Iam desperately trying to deploy my App with Capistrano but it isnt working
Hey Folks,
I have always received great help here, so I hope that it will work out this time so shortly before the end. I would like to deploy my app on my server and use capistrano. However, I come across the following error(s) again and again and don't know how to fix it. First the error was that he couldn't find Yarn or something was wrong with the Yui Compressor. I then installed Yarn on my terminal and the error changed to this one when i try to "cap production deploy"
Caused by:
SSHKit::Command::Failed: rake exit status: 1
rake stdout: DEPRECATION WARNING: Sprockets method register_engine
is deprecated.
Please register a mime type using register_mime_type
then
use register_compressor
or register_transformer
.
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from block in class:Railtie at /home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/less-rails-2.8.0/lib/less/rails/railtie.rb:16)
DEPRECATION WARNING: You are using a deprecated processor interface Less::Rails::ImportProcessor.
Please update your processor interface:
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from block in class:Railtie at /home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/less-rails-2.8.0/lib/less/rails/railtie.rb:21)
Yarn executable was not detected in the system.
Download Yarn at https://yarnpkg.com/en/docs/install
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/bin/rake: No such file or directory - java
rake aborted!
YUI::Compressor::RuntimeError: Command 'java -jar /home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/yui-compressor-0.12.0/lib/yui/../yuicompressor-2.4.8.jar --type css --charset utf-8 /tmp/yui_compress20180918-14505-sgrpkh' returned non-zero exit status
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/yui-compressor-0.12.0/lib/yui/compressor.rb:106:in block in compress'
streamify'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/yui-compressor-0.12.0/lib/yui/compressor.rb:141:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/yui-compressor-0.12.0/lib/yui/compressor.rb:86:in compress'
call'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/yui_compressor.rb:49:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/yui_compressor.rb:28:in call'
call_processor'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in block in call_processors'
reverse_each'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in call_processors'
load_from_unloaded'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in block in load'
fetch_asset_from_dependency_cache'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in load'
block in initialize'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in load'
find_asset'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in find_all_linked_assets'
block in find'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in block (2 levels) in logical_paths'
block in stat_tree'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in block in stat_directory'
each'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in stat_directory'
stat_tree'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in each'
block in logical_paths'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in each'
logical_paths'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in find'
compile'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in block (3 levels) in define'
with_logger'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in block (2 levels) in define'
'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/cli/exec.rb:74:in load'
kernel_load'
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/cli/exec.rb:74:in
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/cli/exec.rb:28:in run'
exec'
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/cli.rb:424:in
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run'
invoke_command'
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor.rb:387:in dispatch'
dispatch'
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/cli.rb:27:in
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor/base.rb:466:in start'
start'
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/cli.rb:18:in
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/exe/bundle:30:in block in <top (required)>'
with_friendly_errors'
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/friendly_errors.rb:124:in
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/exe/bundle:22:in <top (required)>'
load'
/home/deploy/.rvm/gems/ruby-2.5.1/bin/bundle:23:in
/home/deploy/.rvm/gems/ruby-2.5.1/bin/bundle:23:in <main>'
eval'
/home/deploy/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in
/home/deploy/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in `
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
rake stderr: Nothing written
Tasks: TOP => deploy:assets:precompile
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing on host 104.248.180.170: rake exit status: 1
rake stdout: DEPRECATION WARNING: Sprockets method register_engine
is deprecated.
Please register a mime type using register_mime_type
then
use register_compressor
or register_transformer
.
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from block in class:Railtie at /home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/less-rails-2.8.0/lib/less/rails/railtie.rb:16)
DEPRECATION WARNING: You are using a deprecated processor interface Less::Rails::ImportProcessor.
Please update your processor interface:
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from block in class:Railtie at /home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/less-rails-2.8.0/lib/less/rails/railtie.rb:21)
Yarn executable was not detected in the system.
Download Yarn at https://yarnpkg.com/en/docs/install
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/bin/rake: No such file or directory - java
rake aborted!
YUI::Compressor::RuntimeError: Command 'java -jar /home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/yui-compressor-0.12.0/lib/yui/../yuicompressor-2.4.8.jar --type css --charset utf-8 /tmp/yui_compress20180918-14505-sgrpkh' returned non-zero exit status
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/yui-compressor-0.12.0/lib/yui/compressor.rb:106:in block in compress'
streamify'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/yui-compressor-0.12.0/lib/yui/compressor.rb:141:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/yui-compressor-0.12.0/lib/yui/compressor.rb:86:in compress'
call'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/yui_compressor.rb:49:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/yui_compressor.rb:28:in call'
call_processor'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in block in call_processors'
reverse_each'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in call_processors'
load_from_unloaded'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in block in load'
fetch_asset_from_dependency_cache'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in load'
block in initialize'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in load'
find_asset'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in find_all_linked_assets'
block in find'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in block (2 levels) in logical_paths'
block in stat_tree'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in block in stat_directory'
each'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in stat_directory'
stat_tree'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in each'
block in logical_paths'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in each'
logical_paths'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in find'
compile'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in block (3 levels) in define'
with_logger'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in block (2 levels) in define'
'
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/cli/exec.rb:74:in load'
kernel_load'
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/cli/exec.rb:74:in
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/cli/exec.rb:28:in run'
exec'
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/cli.rb:424:in
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run'
invoke_command'
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor.rb:387:in dispatch'
dispatch'
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/cli.rb:27:in
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor/base.rb:466:in start'
start'
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/cli.rb:18:in
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/exe/bundle:30:in block in <top (required)>'
with_friendly_errors'
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/lib/bundler/friendly_errors.rb:124:in
/home/deploy/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.5/exe/bundle:22:in <top (required)>'
load'
/home/deploy/.rvm/gems/ruby-2.5.1/bin/bundle:23:in
/home/deploy/.rvm/gems/ruby-2.5.1/bin/bundle:23:in <main>'
eval'
/home/deploy/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in
/home/deploy/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in `
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
rake stderr: Nothing written
** DEPLOY FAILED
My Capfile
# Load DSL and set up stages
require "capistrano/setup"
# Include default deployment tasks
require "capistrano/deploy"
# Load the SCM plugin appropriate to your project:
#
# require "capistrano/scm/hg"
# install_plugin Capistrano::SCM::Hg
# or
# require "capistrano/scm/svn"
# install_plugin Capistrano::SCM::Svn
# or
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
# 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/bundler"
require "capistrano/rvm"
require "capistrano/rails/assets"
require "capistrano/rails/migrations"
require "capistrano/passenger"
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 }
My Deploy.rb
# Change these
server 'xxx.xxx.xxx', port: 22, roles: [:web, :app, :db], primary: true
set :repo_url, 'git@github.com:WebSepp/Blogapp.git'
set :application, 'Blogapp'
set :user, 'deploy'
set :puma_threads, [4, 16]
set :puma_workers, 0
# Don't change these unless you know what you're doing
set :pty, true
set :use_sudo, false
set :stage, :production
set :deploy_via, :remote_cache
set :deploy_to, "/home/#{fetch(:user)}/apps/#{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 :ssh_options, { forward_agent: true, user: fetch(:user), keys: %w(~/.ssh/usa) }
set :linked_files, %w{config/master.key}
set :puma_preload_app, true
set :puma_worker_timeout, nil
set :puma_init_active_record, true # Change to false when not using ActiveRecord
## 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}
# set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
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/master`
puts "WARNING: HEAD is not the same as origin/master"
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
before :starting, :check_revision
after :finishing, :compile_assets
after :finishing, :cleanup
after :finishing, :restart
end
# ps aux | grep puma # Get puma pid
# kill -s SIGUSR2 pid # Restart puma
# kill -s SIGTERM pid # Stop puma
My Gemfile:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.5.1'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
group :development do
gem "capistrano", "~> 3.7"
gem "capistrano-rails", "~> 1.2"
gem "capistrano-passenger", "~> 0.2.0"
gem "capistrano-yarn"
gem "capistrano-puma"
gem "capistrano-rvm"
#Add this if you"re using rbenv
end
gem 'puma'
gem 'sprockets-rails', :require => 'sprockets/railtie'
# Use SCSS for stylesheets
gem 'sass-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
#
gem 'jquery-rails', '~> 4.3', '>= 4.3.3'
#gem less style
gem 'therubyracer'
gem 'less-rails' #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
#Use twitter bootstrap
gem 'twitter-bootstrap-rails'
gem 'friendly_id', '~> 5.2.0'
gem 'will_paginate', '~> 3.1.0'
gem 'trix-rails', require: 'trix'
gem 'shrine'
gem 'devise'
gem 'timepiece'
gem 'social-share-button'
# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15', '< 4.0'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
My nginx.conf: (not sure if thats relevant probably not)
upstream puma {
server unix:///home/deploy/apps/Blogapp/shared/tmp/sockets/Blogapp-puma.sock;
}
server {
listen 80 default_server deferred;
# server_name example.com;
root /home/deploy/apps/Blogapp/current/public;
access_log /home/deploy/apps/Blogapp/current/log/nginx.access.log;
error_log /home/deploy/apps/Blogapp/current/log/nginx.error.log info;
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
try_files $uri/index.html $uri @puma;
location @puma {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://puma;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 10M;
keepalive_timeout 10;
}
I tried this tutorial:
https://www.digitalocean.com/community/tutorials/deploying-a-rails-app-on-ubuntu-14-04-with-capistrano-nginx-and-puma
And then i switched halfway to that one and tried my luck with that one cause it seems newer:
https://revs.runtime-revolution.com/deploy-your-rails-app-with-capistrano-5ad5d58e9b07
but didnt worked out aswell
Hey Sebastian,
Your error is:
/home/deploy/apps/Blogapp/shared/bundle/ruby/2.5.0/bin/rake: No such file or directory - java
So maybe you have a dependency that needs Java installed. It looks like it's required for Yui compressor.
Make sure Java is installed on your server.