我正在尝试部署我的应用程序(cap deploy:cold
),一切顺利,直到:
Could not find i18n-0.6.4 in any of the sources
现在,我已经看到过这样的其他帖子,但它们都指向了Passenger问题,而在我的情况下,我在服务器上有nginx(Ubuntu Server 12.04)。
我对Rails比较陌生,所以我可能会在这里找不到基本的东西,但我知道i18n是本地安装的(OS X Mountain Lion),'bundle show i18n'给了我:
/Users/myhomedirectory/.rvm/gems/ruby-1.9.3-head/gems/i18n-0.6.4
我的服务器上有问题吗?我该如何处理?
提前感谢您的帮助!
在Capistrano食谱下面
require "rvm/capistrano"
server 'myserverip', :web, :app, :db, primary: true
set :application, "siac"
set :user, "deployer"
set :deploy_to, "/home/#{user}/apps/#{application}"
set :deploy_via, :remote_cache
set :use_sudo, false
set :rvm_type, :system
set :scm, :git
set :repository, "mygitdir"
set :branch, "master"
default_run_options[:pty] = true
ssh_options[:forward_agent] = true
namespace :deploy do
%w[start stop restart].each do |command|
desc "#{command} unicorn server"
task command, roles: :app, except: {no_release: true} do
run "/etc/init.d/unicorn_#{application} #{command}"
end
end
task :setup_config, roles: :app do
sudo "ln -nfs #{current_path}/config/nginx.conf /etc/nginx/sites-enabled/#{application}"
sudo "ln -nfs #{current_path}/config/unicorn_init.sh /etc/init.d/unicorn_#{application}"
run "mkdir -p #{shared_path}/config"
put File.read("config/database.yml.tpl"), "#{shared_path}/config/database.yml"
puts "Now edit the config files in #{shared_path}."
end
after "deploy:setup", "deploy:setup_config"
task :symlink_config, roles: :app do
run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
end
after "deploy:finalize_update", "deploy:symlink_config"
desc "Make sure local git is in sync with remote."
task :check_revision, roles: :web do
unless `git rev-parse HEAD` == `git rev-parse origin/master`
puts "WARNING: HEAD is not the same as origin/master"
puts "Run `git push` to sync changes."
exit
end
end
before "deploy", "deploy:check_revision"
end
和stacktrace:
* executing "cd -- /home/deployer/apps/siac/releases/20130319035235 && rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile && cp -- /home/deployer/apps/siac/shared/assets/manifest.yml /home/deployer/apps/siac/releases/20130319035235/assets_manifest.yml"
servers: ["myserverip"]
[myserverip] executing command
** [out :: myserverip] Could not find i18n-0.6.4 in any of the sources
** [out :: myserverip] Run `bundle install` to install missing gems.
command finished in 905ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/deployer/apps/siac/releases/20130319035235; true"
servers: ["myserverip"]
[myserverip] executing command
command finished in 627ms
failed: "rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'default' -c 'cd -- /home/deployer/apps/siac/releases/20130319035235 && rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile && cp -- /home/deployer/apps/siac/shared/assets/manifest.yml /home/deployer/apps/siac/releases/20130319035235/assets_manifest.yml'" on myserverip
答案 0 :(得分:3)
从评论中复制答案,以便从“未答复”过滤器中删除此问题:
回答谢谢你们,在用 cap shell 和上限进行一些测试之后 调用COMMAND = ,我最终清理了capistrano配方,修复了 服务器端的一些sym链接,我让它工作。谢谢大家!