美洲狮没有任何理由在1.9.3中运行

时间:2015-08-26 13:29:49

标签: capistrano

我尝试使用capistano 3部署服务器

我已经安装了rbenv,所有的东西都可以使用capistrano。

当我运行puma服务器时出现语法错误。这似乎是因为美洲狮在红宝石1.9.3中运行。

使用rbenv和puma部署机器的正确方法是什么?

ruby​​ -v

ruby​​ 2.2.2p95(2015-04-13修订版50295)[x86_64-linux]

登录

               ^
/home/user123/sample_production/releases/20150826132515/app/controllers/admin/dashboards_controller.rb:35: syntax error, unexpected '}', expecting keyword_end
      { "$sort": { updated_at: -1 } },
                                     ^
/home/user123/sample_production/releases/20150826132515/app/controllers/admin/dashboards_controller.rb:40: syntax error, unexpected ',', expecting keyword_end
/home/user123/sample_production/releases/20150826132515/app/controllers/admin/dashboards_controller.rb:50: syntax error, unexpected $end, expecting keyword_end
    from /home/user123/sample_production/shared/bundle/ruby/1.9.1/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `block in require'
    from /home/user123/sample_production/shared/bundle/ruby/1.9.1/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'

root@ip-172-31-31-100:/home/user123/sample_production/current# bundle exec puma -C config/puma.rb
[12990] Puma starting in cluster mode...
[12990] * Version 2.13.4 (ruby 1.9.3-p484), codename: A Midsummer Code's Dream
[12990] * Min threads: 1, max threads: 6
[12990] * Environment: production
[12990] * Process workers: 1
[12990] * Preloading application

deploy.rb

# Default value for keep_releases is 5
set :keep_releases, 5

# rbenv 的設定

set :rbenv_type, :user
set :rbenv_ruby, "2.2.2"
set :rbenv_path, "/home/poc/.rbenv"
set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec"
set :rbenv_map_bins, %w(rake gem bundle ruby rails)
set :rbenv_roles, :all

# set :rbenv_ruby, "2.2.2"
# set :rbenv_path, ENV["RBENV_PATH"]
# set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec"
# set :rbenv_map_bins, %w(rake gem bundle ruby rails)
# set :rbenv_roles, :all

0 个答案:

没有答案