ruby on rails - "missing argument -c" when restarting Unicorn via Mina -


i trying deploy app server using mina , need server restarted automatically. unfortunately doesn't work , don't know why. here trying:

require 'mina/bundler'  require 'mina/rvm'  require 'mina/rails'  require 'mina/git'   ...  set :unicorn_conf, "#{shared_path}/config/unicorn.rb" set :unicorn_pid, "#{deploy_to}/current/tmp/pids/unicorn.pid"  ... task :environment   invoke :'rvm:use[ruby-2.2.3]' end  task deploy: :environment   deploy     # put things prepare empty release folder here.     # commands queued here run on new release directory.     invoke :'git:clone'     invoke :'deploy:link_shared_paths'      invoke :'bundle:install'       invoke :'rails:db_migrate'      invoke :'rails:assets_precompile'       invoke :restart_server   end end  task :restart_server   if file.exists? unicorn_pid     queue 'kill `cat #{unicorn_pid}`'   end   queue 'bundle exec unicorn -c #{deploy_to}/#{unicorn_conf} -e production -d'   puts "bundle exec unicorn -c #{deploy_to}/#{:unicorn_conf} -e production -d" end 

this last puts statement, put debug , prints string want. still got error:

 /home/webuser/tmpcms/tmp/build-145333668721611/vendor/bundle/ruby/2.2.0/gems/unicorn-5.0.1/bin/unicorn:110:in `block in <top (required)>': missing argument: -c (optionparser::missingargument)    /home/webuser/tmpcms/tmp/build-145333668721611/vendor/bundle/ruby/2.2.0/gems/unicorn-5.0.1/bin/unicorn:10:in `new'    /home/webuser/tmpcms/tmp/build-145333668721611/vendor/bundle/ruby/2.2.0/gems/unicorn-5.0.1/bin/unicorn:10:in `<top (required)>'    /home/webuser/tmpcms/tmp/build-145333668721611/vendor/bundle/ruby/2.2.0/bin/unicorn:23:in `load'    /home/webuser/tmpcms/tmp/build-145333668721611/vendor/bundle/ruby/2.2.0/bin/unicorn:23:in `<main>'    !       bash: line 209: log: command not found !     error: deploy failed. 

i don't know causes it, can me it?

upd: seems variable substitution , fetch function, still can't understand wrong. here i've tested:

task :restart_server => :environment   if file.exists? unicorn_pid     queue 'kill `cat #{unicorn_pid}`'   end   queue 'cd /home/webuser/tmpcms/current; pwd; bundle exec unicorn -c #{deploy_to}/#{unicorn_conf} -e production -d' end 

bundle exec part doesn't work, doesn't execute , prints connection closed instead. same thing if replace path in cd command cd #{deploy_to} or cd #{fetch(:deploy_to)}

oh my, answer easy. forgot using single quotes instead of double quotes, , variables weren't substituted there needed. replacing single quotes double quotes solved it.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -