Я пытаюсь запустить приложение Capistrano через мое приложение. Также я использую:
Ubuntu 10.04.1 LTS
Phusion Passenger
PostgreSQL 9
Nginx
Rails 3.1.3
Ruby 1.9.3
После того, как я сделал
cap deploy:update
Создает папки и т. Д.
Тогда я попробую в / current folder
rake RAILS_ENV=production db:schema:load
А теперь показывает следующее:
Could not find rake-0.9.2.2 in any of the sources
Run `bundle install` to install missing gems.
Но это установлено! Я пытался $ bundle install
, $ gem update rake
, это не помогло. Эта ошибка появляется снова и снова.
$ gem list
*** LOCAL GEMS ***
actionmailer (3.1.3)
actionpack (3.1.3)
activemodel (3.1.3)
activerecord (3.1.3)
activeresource (3.1.3)
activesupport (3.1.3)
ansi (1.4.1)
arel (2.2.1)
autotest (4.4.6)
builder (3.0.0)
bundler (1.0.21 ruby)
coffee-rails (3.1.1)
coffee-script (2.2.0)
coffee-script-source (1.2.0)
daemon_controller (0.2.6)
erubis (2.7.0)
execjs (1.2.13)
fastthread (1.0.7)
ffi (1.0.11)
gravatar_image_tag (1.0.0)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.19)
json (1.6.5)
libv8 (3.3.10.4 x86_64-linux)
mail (2.3.0)
mime-types (1.17.2)
multi_json (1.0.4)
passenger (3.0.11)
pg (0.12.2)
polyglot (0.3.3)
rack (1.3.6)
rack-cache (1.1)
rack-mount (0.8.3)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.1.3)
railties (3.1.3)
rake (0.9.2.2, 0.9.2)
rdoc (3.12)
sass (3.1.12)
sass-rails (3.1.5)
sprockets (2.0.3)
sqlite3 (1.3.5)
sys-uname (0.9.0)
texticle (2.0)
therubyracer (0.9.9)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
turn (0.8.3)
tzinfo (0.3.31)
uglifier (1.2.2)
will_paginate (3.0.2)
ZenTest (4.6.2)
$ рейк списка драгоценных камней
*** LOCAL GEMS ***
rake (0.9.2.2, 0.9.2)
Вот мой config / deploy.rb
set :user, "root"
set :rails_env, "production"
default_run_options[:pty] = true
set :repository, "git://github.com/Loremaster/sample_app.git"
set :application, "ror_tutorial"
set :deploy_to, "/vol/www/apps/#{application}"
set :scm, :git
set :branch, "master"
server "xxx.xxx.xxx.xxx", :app,
:web,
:db, :primary => true
# If you are using Passenger mod_rails uncomment this:
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
Capfile
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
# Uncomment if you are using Rails' asset pipeline
# load 'deploy/assets'
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy' # remove this line to skip loading any of the default tasks
UPD: Я исправил ошибку с Rake, добавив rake gem в gemfile, а затем запустил bundle install
на моем локальном компьютере и затем загрузил его на сервер через Capistrano.