Having issues getting assets:precompile to work..

241 views
Skip to first unread message

Altonymous

unread,
Jan 15, 2014, 10:38:13 AM1/15/14
to capis...@googlegroups.com
Versions:
  • Ruby: 2.1.0-p0
  • Capistrano: 3.1.0
  • Rails: 4.0.2
Platform:
  • Working On: Mavericks
  • Deploying To: Ubuntu 13.10

Using the following setup, I'm getting an error stating bundle can't be found.  I'm unable to figure out where the configuration is incorrect?  Does anyone see anything, perhaps something on the server?


error.log
INFO [0be106dd] Running bundle exec rake assets:precompile on staging.example.com

DEBUG
[0be106dd] Command: cd /var/www/example.com/releases/20140115151457 && ( PATH=/opt/ruby/bin:$PATH RAILS_ENV=staging bundle exec rake assets:precompile )
DEBUG
[0be106dd] bash: bundle: command not found
DEBUG
[0be106dd]
cap aborted
!
rake stdout
: Nothing written
rake stderr
: Nothing written
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/sshkit-1.3.0/lib/sshkit/command.rb:94:in `exit_status='
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:142:in `
block (4 levels) in _execute'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/channel.rb:551:in `call'

/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/channel.rb:551:in `do_request'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:561:in `
channel_request'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'

/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:221:in `preprocess'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:205:in `
process'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `block in loop'

/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `
loop'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/channel.rb:269:in `wait'

/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:164:in `block (2 levels) in _execute'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/channel.rb:514:in `
call'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/channel.rb:514:in `do_open_confirmation'

/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:545:in `channel_open_confirmation'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:465:in `
dispatch_incoming_packets'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:221:in `preprocess'

/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:205:in `process'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `
block in loop'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `loop'

/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:166:in `
block in _execute'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:123:in `tap'

/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:123:in `_execute'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:66:in `
execute'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/capistrano-rails-1.1.0/lib/capistrano/tasks/assets.rake:63:in `block (6 levels) in <top (required)>'

/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/sshkit-1.3.0/lib/sshkit/backends/abstract.rb:89:in `with'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/capistrano-rails-1.1.0/lib/capistrano/tasks/assets.rake:62:in `
block (5 levels) in <top (required)>'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/sshkit-1.3.0/lib/sshkit/backends/abstract.rb:81:in `within'

/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/capistrano-rails-1.1.0/lib/capistrano/tasks/assets.rake:61:in `block (4 levels) in <top (required)>'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:54:in `
instance_exec'
/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:54:in `run'

/Users/altonymous/.rvm/gems/ruby-2.1.0-p0@example/gems/sshkit-1.3.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'


Capfile
# Load DSL and Setup Up Stages

require 'capistrano/setup'

# Includes default deployment tasks
require 'capistrano/deploy'
require 'capistrano/rvm'
require 'capistrano/bundler'
require 'capistrano/rails/assets'

# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }


deploy.rb
set :application, 'example'

set :repo_url, 'g...@github.com:example/example.git'
ask
:branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }

set :deploy_to, '/var/www/example.com'
set :scm, :git

set :format, :pretty
set :log_level, :debug
set :pty, true

set :linked_files, %w{config/database.yml}
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}

set :bundle_without, %w{development test travis}.join(' ')
set :default_env, { path: "/opt/ruby/bin:$PATH" }
# set :keep_releases, 5

namespace :deploy do
  desc
'Restart application'
  task
:restart do
    on roles
(:app), in: :sequence, wait: 5 do
      within release_path
do
       
# Your restart mechanism here, for example:
       
#execute :touch, release_path.join('tmp/restart.txt')
     
end
   
end
 
end

  after
:restart, :clear_cache do
    on roles
(:web), in: :groups, limit: 3, wait: 10 do
     
# Here we can do anything such as:
     
# within release_path do
     
#   execute :rake, 'cache:clear'
     
# end
   
end
 
end

  after
:finishing, 'deploy:cleanup'
end


staging.rb
server 'staging.example.com', user: 'ubuntu', roles: %w{web app}

set :ssh_options, { forward_agent: true, auth_methods: ['publickey'], keys: %w(~/.ssh/example.pem) }


~/.bash_profile
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*


~/.profile
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting

Lee Hambley

unread,
Jan 15, 2014, 12:43:09 PM1/15/14
to capistrano
What's the result of:

ssh us...@staging.example.com 'which bundle'

?

--
You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/f191826e-f048-40be-91ef-1f7529fbe7b8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages