我試圖在項目上運行cap deploy
。我不斷收到這個錯誤,我不知道它從何而來:部署導軌 - 無法在任何源中找到rake-11.1.2
➜ example git:(master) cap deploy
* 2016-04-04 19:19:10 executing `deploy'
* 2016-04-04 19:19:10 executing `deploy:update'
** transaction: start
* 2016-04-04 19:19:10 executing `deploy:update_code'
executing locally: "git ls-remote [email protected]:tdelam/example.git HEAD"
command finished in 807ms
* executing "git clone -q [email protected]:tdelam/example.git /srv/rails_apps/example/releases/20160404231911 && cd /srv/rails_apps/example/releases/20160404231911 && git checkout -q -b deploy 24f9d11882b2481d4c2f0cac1fe87095f265cfea && (echo 24f9d11882b2481d4c2f0cac1fe87095f265cfea > /srv/rails_apps/example/releases/20160404231911/REVISION)"
servers: ["56.223.75.114"]
[56.223.75.114] executing command
command finished in 2598ms
* 2016-04-04 19:19:14 executing `deploy:finalize_update'
triggering before callbacks for `deploy:finalize_update'
* 2016-04-04 19:19:14 executing `deploy:assets:symlink'
* executing "rm -rf /srv/rails_apps/example/releases/20160404231911/public/assets && mkdir -p /srv/rails_apps/example/releases/20160404231911/public && mkdir -p /srv/rails_apps/example/shared/assets && ln -s /srv/rails_apps/example/shared/assets /srv/rails_apps/example/releases/20160404231911/public/assets"
servers: ["56.223.75.114"]
[56.223.75.114] executing command
command finished in 22ms
* 2016-04-04 19:19:14 executing `bundle:install'
* executing "cd /srv/rails_apps/example/releases/20160404231911 && bundle install --gemfile /srv/rails_apps/example/releases/20160404231911/Gemfile --path /srv/rails_apps/example/shared/bundle --deployment --quiet --without development test"
servers: ["56.223.75.114"]
[56.223.75.114] executing command
** [out :: 56.223.75.114] Could not find rake-11.1.2 in any of the sources
command finished in 6530ms
*** [deploy:update_code] rolling back
* executing "rm -rf /srv/rails_apps/example/releases/20160404231911; true"
servers: ["56.223.75.114"]
[56.223.75.114] executing command
command finished in 34ms
failed: "sh -c 'cd /srv/rails_apps/example/releases/20160404231911 && bundle install --gemfile /srv/rails_apps/example/releases/20160404231911/Gemfile --path /srv/rails_apps/example/shared/bundle --deployment --quiet --without development test'" on 56.223.75.114
我capfile很簡單:
set :application, "example"
set :repository, "[email protected]:tdelam/example.git"
#set :rvm_type, :system
set :scm, :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
set :user, "jeffc"
set :deploy_to, "/srv/rails_apps/#{application}"
set :use_sudo, true
set :keep_releases, 5
role :web, "56.223.75.114" # Your HTTP server, Apache/etc
role :app, "56.223.75.114" # This may be the same as your `Web` server
role :db, "56.223.75.114", :primary => true # This is where Rails migrations will run
role :db, "56.223.75.114"
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
end
end
以及最後但並非最不重要的,這裏是它抱怨耙版本:
➜ example git:(master) rake --version
rake, version 11.1.2
這耙版本既是我的開發機器上,以及我的服務器
編輯:在服務器上我的紅寶石版本ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-linux]
這裏是我的Gemfile: 源「https://rubygems.org」
gem 'rails', '3.2.15'
group :development, :test do
gem 'sqlite3'
gem 'capistrano', '~> 2.15.7'
gem 'thin'
#gem 'rvm-capistrano'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'execjs'
gem 'therubyracer'
gem 'uglifier', '>= 1.0.3'
end
group :production do
gem 'mysql2','> 0.3'
end
gem 'jquery-rails'
# Refinery CMS
gem 'refinerycms', '~> 2.1.0'
# Optionally, specify additional Refinery CMS Extensions here:
gem 'refinerycms-acts-as-indexed', '~> 1.0.0'
有沒有人有一個建議,以這是怎麼回事?
服務器上的ruby版本是什麼? –
對,那會很重要......'ruby 2.1.4p265(2014-10-27 revision 48166)[x86_64-linux]' – JeffC
對不起,驗證你是否安裝了bundler,請:「bundler -v」in你的服務器 –