Deployment capistrano使用jruby部署

Deployment capistrano使用jruby部署,deployment,rake,rvm,capistrano,jruby,Deployment,Rake,Rvm,Capistrano,Jruby,我有一个服务器,它可以容纳多个rails应用程序,其中大多数是ruby,而有一个应用程序我们使用jruby 在乘客下展开后,我总是会遇到此错误: Could not find rake-10.1.0 in any of the sources (Bundler::GemNotFound) 然而,当我使用WEBrick时,我不明白这一点 部署脚本如下所示: #server details default_run_options[:pty] = true set :user, "xxxxx" se

我有一个服务器,它可以容纳多个rails应用程序,其中大多数是ruby,而有一个应用程序我们使用jruby

在乘客下展开后,我总是会遇到此错误:

Could not find rake-10.1.0 in any of the sources (Bundler::GemNotFound)
然而,当我使用WEBrick时,我不明白这一点

部署脚本如下所示:

#server details
default_run_options[:pty] = true
set :user, "xxxxx"
set :scm_passphrase, "yyyyyy"
set :domain, "abc.abc.com"
set :application, "project_adsadsa"

#file path
set :repository,  "git@github.com:jjjjjjjj/aaaaaaaa.git"
set :deploy_to, "/var/www/html/jdbc"

# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`

role :web, "ip_address"                # Your HTTP server, Apache/etc
role :app, "ip_address"                           # This may be the same as your `Web` server
role :db,  "ip_address", :primary => true         # This is where Rails migrations will run

#miscellaneous options
set :rails_env, :development
set :deploy_via, :remote_cache
set :scm, 'git'
set :branch, 'master'
set :scm_verbose, true
set :use_sudo, false
ssh_options[:forward_agent] = true

namespace :deploy do
  desc "cause Passenger to initiate a restart"
  task :restart do
    run "touch #{current_path}/tmp/restart.txt"
  end

end

after "deploy:update_code", :bundle_install
after "deploy", :create_symlink

desc "do symlink the db"
task :create_symlink, :roles => :app do
  run "ln -s #{shared_path}/development.sqlite3 #{current_path}/db/development.sqlite3"
end

desc "install the necessary prerequisites"
task :bundle_install, :roles => :app do
  run "cd #{release_path} && bundle install --without production"
end

请提供更多详细信息,您的乘客配置是什么,如何部署?有很多可能的方法可以解决这个问题。基本上,我想在同一台服务器上运行单独的ruby和jruby应用程序,我只能全局使用rvm use-default,因此,我想知道如何将rvm use default设置为cap deploy下的各个项目显示您的脚本,因为现在您的问题没有提供有关您尝试编写的代码的任何详细信息。您好,请参阅我的部署脚本。很抱歉,回复太晚。您的部署脚本没有使用任何东西来使用rvm。如何确保在服务器上使用rvm?你听说过吗