cap生产在轨道上部署ruby

时间:2015-07-20 17:41:26

标签: ruby-on-rails capistrano3

我尝试从github文件夹部署rails项目上的ruby。但是,当我运行cap production deploy

时出现了这样的错误
/home/deploy/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in 
'require': cannot load such file -- capistrano/cli (LoadError) from /home/deploy/.rbenv/
versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in 'require' 
from /usr/bin/cap:3:in '<main>'

我的deploy.rb以:

开头
# config valid only for Capistrano 3.1
lock '3.1.0'

我使用以下命令行安装了Capistrano v.3.1:

gem install capistrano -v 3.1.0

有人知道为什么我还有错误吗?

附加Gemfile:

source 'https://rubygems.org'
gem 'rails', '4.1.0'
# Frontend
gem 'simple_form'
gem 'nested_form', github: 'ryanb/nested_form'
gem 'turbolinks'
gem 'bootstrap-sass', '~> 3.2.0'
gem 'kaminari'

# Javascript
gem 'gon'
gem 'angularjs-rails'
gem 'selectize-rails'
gem 'js-routes'

# Backend
gem 'pg'
gem 'mongoid', github: 'mongoid/mongoid'
gem 'mongoid_geospatial'
gem "active_model_serializers"
gem 'devise'
gem 'state_machine'
gem "rolify"
gem "pundit"
gem 'enumerize'
gem 'simple-rss'
gem 'tweetstream'
gem 'swagger-docs', path: "vendor/gems/swagger-docs-0.1.5"
gem 'wkhtmltopdf-binary'
gem 'wicked_pdf'
gem 'paper_trail', '~> 3.0.3'

# Temporary
gem 'faker'
gem 'factory_girl_rails'

# Asset gems
gem 'haml-rails'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'sass-rails', '~> 4.0.3'
gem 'compass-rails'

group :development do
  gem 'spring' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'switch_user'
  gem 'better_errors'
  gem 'binding_of_caller'
  gem 'sextant'
  gem 'guard-livereload', require: false
  gem 'capistrano', '~> 3.1.0'
  gem 'capistrano-bundler', '~> 1.1.2'
  gem 'capistrano-rails', '~> 1.1.1'
  gem 'capistrano-rbenv', github: "capistrano/rbenv"
end

group :test do
  gem 'rspec-rails'
  gem 'spring-commands-rspec'
  gem 'guard-rspec'
  gem 'fuubar'
  gem 'capybara'
  gem 'capybara-webkit'
  gem 'capybara-email'
  gem 'capybara-screenshot'
  gem 'database_cleaner'
end

group :test, :darwin do
 gem 'rb-fsevent'# if `uname` =~ /Darwin/
end

group :development, :test do
  gem 'pry-rails'
  gem 'pry-remote'
end
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer',  platforms: :ruby

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

谢谢!

0 个答案:

没有答案