0

I've been trying to deploy to a VPS using Capistrano, and the following command is throwing me a lot of errors:

* executing "cd -- /home/work/for_linode/releases/20130317174830 && rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile && cp -- /home/work/for_linode/shared/assets/manifest.yml /home/work/for_linode/releases/20130317174830/assets_manifest.yml"

Which results in the following:

servers: ["50.116.11.160"]
    [50.116.11.160] executing command
*** [err :: 50.116.11.160] rake aborted!
*** [err :: 50.116.11.160] Could not find activesupport-3.2.11 in any of the sources
*** [err :: 50.116.11.160] /usr/local/rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/spec_set.rb:92:in `block in materialize'
*** [err :: 50.116.11.160] /usr/local/rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/spec_set.rb:85:in `map!'
*** [err :: 50.116.11.160] /usr/local/rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/spec_set.rb:85:in `materialize'
*** [err :: 50.116.11.160] /usr/local/rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/definition.rb:114:in `specs'
*** [err :: 50.116.11.160] /usr/local/rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/definition.rb:159:in `specs_for'
*** [err :: 50.116.11.160] /usr/local/rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/definition.rb:148:in `requested_specs'
*** [err :: 50.116.11.160] /usr/local/rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/environment.rb:18:in `requested_specs'
*** [err :: 50.116.11.160] /usr/local/rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:13:in `setup'
*** [err :: 50.116.11.160] /usr/local/rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler.rb:120:in `setup'
*** [err :: 50.116.11.160] /usr/local/rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/setup.rb:17:in `<top (required)>'
*** [err :: 50.116.11.160] /home/work/for_linode/releases/20130317174830/config/boot.rb:6:in `<top (required)>'
*** [err :: 50.116.11.160] /home/work/for_linode/releases/20130317174830/config/application.rb:1:in `<top (required)>'
*** [err :: 50.116.11.160] /home/work/for_linode/releases/20130317174830/Rakefile:5:in `<top (required)>'
*** [err :: 50.116.11.160] /usr/local/rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
*** [err :: 50.116.11.160] /usr/local/rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'
*** [err :: 50.116.11.160] (See full trace by running task with --trace)
    command finished in 1888ms
*** [deploy:update_code] rolling back
  * executing "rm -rf /home/work/for_linode/releases/20130317174830; true"
    servers: ["50.116.11.160"]
    [50.116.11.160] executing command
    command finished in 1591ms
failed: "rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'ruby-1.9.3-p392' -c 'cd -- /home/work/for_linode/releases/20130317174830 && rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile && cp -- /home/work/for_linode/shared/assets/manifest.yml /home/work/for_linode/releases/20130317174830/assets_manifest.yml'" on 50.116.11.160

I am by no means an expert using capistrano, and the similar questions around here, are related to a problem that's a bit different,

Could you guys please help figure out what's going on?

EDIT:

set :application, "for_linode"
set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"")
set :bundle_without, [:development]
set :rvm_install_ruby_params, '--1.9.3-p194' # for jruby/rbx default to 1.9 mode
set :rvm_install_pkgs, %w[libyaml openssl] # package list from https://rvm.io/packages
set :rvm_install_ruby_params, '--with-opt-dir=/root/.rvm/usr' # package support

before 'deploy:setup', 'rvm:install_rvm'   # install RVM
before 'deploy:setup', 'rvm:install_pkgs'  # install RVM packages before Ruby
before 'deploy:setup', 'rvm:install_ruby'  # install Ruby and create gemset, or:
before 'deploy:setup', 'rvm:create_gemset' # only create gemset
before 'deploy:setup', 'rvm:import_gemset' # import gemset from file

require "rvm/capistrano"
require "bundler/capistrano"

set :repository,  "git://github.com/jlstr/for_linode.git"
# set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
set :branch, "master"
set :scm, :git
set :user, "root"
set :scm_username, "joe"
set :use_sudo, true
set :deploy_to, '/home/work/for_linode'
#set :rvm_ruby_string, 'ruby-1.9.3-p392'
set :rvm_type, :system

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

# if you want to clean up old releases on each deploy uncomment this:
# after "deploy:restart", "deploy:cleanup"

# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts

# 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

require "rvm/capistrano"
load 'deploy/assets'

1 Answer 1

1

use this piece of code for assets:

set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"")
set :bundle_without, [:development]
require "rvm/capistrano"
require "bundler/capistrano"
load 'deploy/assets'

extracted from => https://github.com/mpapis/ad/blob/master/config/deploy.rb

5
  • Sir, Thanks for your answer. for starters, How do you know it's an asset pipeline related problem?
    – jlstr
    Mar 17, 2013 at 23:34
  • Hello, I've posted my deploy.rb file, it Appears to be deploying correctly. But I'm still getting this type of warning: usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>': *** [err :: 50.116.11.160] It seems your ruby installation is missing psych (for YAML output). Is this normal?
    – jlstr
    Mar 17, 2013 at 23:59
  • I know because the failed task is rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile
    – mpapis
    Mar 18, 2013 at 0:20
  • please notice that your log in question shows 1.9.3-p392 and in the comment it is 1.9.3-p194 - those are two different ruby versions and it's most likely the cause of problems
    – mpapis
    Mar 18, 2013 at 0:24
  • Yes, I know... this piece of code ENV['GEM_HOME'].gsub(/.*\//,"") when run in IRB gave me: 1.9.3-p194, So I had to uninstall all rubies and just install that one alone patch194
    – jlstr
    Mar 18, 2013 at 2:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.