这是我的 config/unicorn/development.rb
app_path = "/home/ec2-user/apps/app_dev/current"
worker_processes 1
preload_app false
timeout 300
listen 3333
working_directory app_path
pid "#{app_path}/tmp/pids/unicorn.pid"
rails_env = 'development'
stderr_path "log/unicorn.log"
stdout_path "log/unicorn.log"
这是我的 Capfile
# Load DSL and Setup Up Stages
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/deploy'
require 'capistrano/rvm'
# require 'capistrano/rbenv'
# require 'capistrano/chruby'
require 'capistrano/bundler'
# require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano3/unicorn'
# require 'sidekiq/capistrano'
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
在运行以下命令时"cap development unicorn:start"
从我的本地环境
我收到以下错误
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
DEBUG [eba94152]
DEBUG [eba94152] You need to change your terminal emulator preferences to allow login shell.
DEBUG [eba94152] Sometimes it is required to use `/bin/bash --login` as the command.
DEBUG [eba94152] Please visit https://rvm.io/integration/gnome-terminal/ for a example.
DEBUG [eba94152]
DEBUG [eba94152] /home/ec2-user/apps/app_dev/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/configurator.rb:75:in `read'
DEBUG [eba94152] :
DEBUG [eba94152] No such file or directory - /home/ec2-user/apps/app_dev/current/config/unicorn/.rb
DEBUG [eba94152] (
DEBUG [eba94152] Errno::ENOENT
DEBUG [eba94152] )
cap aborted!
bundle stdout: Nothing written
bundle stderr: Nothing written
让我知道如何在 master 分支中启动独角兽服务器