Solved the latest issue. It was a permissions problem. The deploy directory was created by root due to me testing with set :use_sudo, true. I changed it to false, deleted the directory then ran cap deploy:setup and cap deploy again. It worked!
The cap -d flag was key to understanding the nature of the failures. I would suggest to the Capistrano dev team that if the deploy fails and rolls back a hint to try the -d option would be great. Again, thanks for the help and hints. Regards, -Ian On Tuesday, September 17, 2013 11:40:30 PM UTC-7, Ian Morcott wrote: > > Newbi alert.. > > All the deployment joy started while I was playing with a new Rails 4 > app. Somehow in the process I broke an existing apps ability to be > deployed. > > In my efforts, for the last two days, to clean up my problem I have tried > to sync both machines with the same version of RVM, ruby and related gems. > > The basic setup is my MacBook Pro as my dev machine, Ubuntu 12.04 > Rackspace server is the deploy target and git is my source control. > > I would really appreciate your assistance so I can understand the nature > of the problem and any solutions. Thanks in advance. > > > Both cap versions are: > Capistrano v2.15.5 > > The error: > > * executing "cd -- /var/www/DataSimply/releases/20130918055223 && bundle > exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile" > servers: ["ip address"] > [ip address] executing command > ** [out :: ip address] > /usr/local/rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/rubygems_integration.rb:187:in > > `stub_source_index170' > ** [out :: ip address] : > ** [out :: ip address] uninitialized constant Gem::SourceIndex > ** [out :: ip address] ( > ** [out :: ip address] NameError > ** [out :: ip address] ) > ** [out :: ip address] from > /usr/local/rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/rubygems_integration.rb:353:in > > `stub_rubygems' > ** [out :: ip address] from > /usr/local/rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/rubygems_integration.rb:250:in > > `replace_entrypoints' > ** [out :: ip address] from > /usr/local/rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:14:in > > `setup' > ** [out :: ip address] from > /usr/local/rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler.rb:116:in > > `setup' > ** [out :: ip address] from > /usr/local/rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/setup.rb:7:in > > `<top (required)>' > ** [out :: ip address] from > /usr/local/rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:53:in > > `require' > ** [out :: ip address] from > /usr/local/rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:53:in > > `require' > command finished in 2862ms > *** [deploy:update_code] rolling back > * executing "rm -rf /var/www/DataSimply/releases/20130918055223; true" > servers: ["ip address"] > [ip address] executing command > command finished in 1023ms > failed: "env > GEM_PATH=/home/datasimply/.gems/gems/:/home/datasimply/.rvm/gems/ruby-1.9.3-p286/gems/ > > PATH=/home/datasimply/.gems/bin/:/home/datasimply/.rvm/gems/ruby-1.9.3-p286/bin/:$PATH > > rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'ruby-1.9.3-p374' -c > 'cd -- /var/www/DataSimply/releases/20130918055223 && bundle exec rake > RAILS_ENV=production RAILS_GROUPS=assets assets:precompile'" on ip address > > > rvm info for the target: > > system: > > system: > uname: "Linux DataSimply-2 3.2.0-24-virtual #39-Ubuntu SMP Mon > May 21 18:44:18 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux" > system: "ubuntu/12.04/x86_64" > bash: "/bin/bash => GNU bash, version 4.2.25(1)-release > (x86_64-pc-linux-gnu)" > zsh: " => not installed" > > rvm: > version: "rvm 1.22.10 (stable) by Wayne E. Seguin < > [email protected]>, Michal Papis <[email protected]> [https://rvm.io/ > ]" > updated: "5 hours 20 minutes 32 seconds ago" > path: "/usr/local/rvm" > > homes: > gem: "/home/datasimply/.gems" > ruby: "/usr/local/rvm/rubies/ruby-1.9.3-p374" > > binaries: > ruby: "/usr/local/rvm/rubies/ruby-1.9.3-p374/bin/ruby" > irb: "/usr/local/rvm/rubies/ruby-1.9.3-p374/bin/irb" > gem: "/usr/local/rvm/rubies/ruby-1.9.3-p374/bin/gem" > rake: "/home/datasimply/.gems/bin/rake" > > environment: > PATH: > "/home/datasimply/.gems/bin:/home/datasimply/bin:/usr/local/rvm/gems/ruby-1.9.3-p374/bin:/usr/local/rvm/gems/ruby-1.9.3-p374@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p374/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/datasimply/.rvm//bin" > GEM_HOME: "/home/datasimply/.gems" > GEM_PATH: "/home/datasimply/.gems:/usr/lib/ruby/gems/1.8" > MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-1.9.3-p374" > IRBRC: "/usr/local/rvm/rubies/ruby-1.9.3-p374/.irbrc" > RUBYOPT: "" > gemset: "" > > > > rvm info for my dev machine: > > system: > uname: "Darwin Ians-MacBook-Pro-2.local 11.4.2 Darwin Kernel > Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; > root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64" > system: "osx/10.7/x86_64" > bash: "/bin/bash => GNU bash, version 3.2.48(1)-release > (x86_64-apple-darwin11)" > zsh: "/bin/zsh => zsh 4.3.11 (i386-apple-darwin11.0)" > > rvm: > version: "rvm 1.22.9 (master) by Wayne E. Seguin < > [email protected]>, Michal Papis <[email protected]> [https://rvm.io/ > ]" > updated: "7 hours 45 minutes 44 seconds ago" > path: "/Users/imorcott/.rvm" > > ruby: > interpreter: "ruby" > version: "1.9.3p374" > date: "2013-01-15" > platform: "x86_64-darwin11.4.2" > patchlevel: "2013-01-15 revision 38858" > full_version: "ruby 1.9.3p374 (2013-01-15 revision 38858) > [x86_64-darwin11.4.2]" > > homes: > gem: "/Users/imorcott/.rvm/gems/ruby-1.9.3-p374" > ruby: "/Users/imorcott/.rvm/rubies/ruby-1.9.3-p374" > > binaries: > ruby: "/Users/imorcott/.rvm/rubies/ruby-1.9.3-p374/bin/ruby" > irb: "/Users/imorcott/.rvm/rubies/ruby-1.9.3-p374/bin/irb" > gem: "/Users/imorcott/.rvm/rubies/ruby-1.9.3-p374/bin/gem" > rake: "/Users/imorcott/.rvm/gems/ruby-1.9.3-p374/bin/rake" > > environment: > PATH: > "/Users/imorcott/.rvm/gems/ruby-1.9.3-p374/bin:/Users/imorcott/.rvm/gems/ruby-1.9.3-p374@global/bin:/Users/imorcott/.rvm/rubies/ruby-1.9.3-p374/bin:/Users/imorcott/.rvm/bin:/Library/Frameworks/Python.framework/Versions/3.3/bin:/usr/local/heroku/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/local/git/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin:/Users/imorcott/Documents/ThirdParty/hadoop-1.0.3/bin:/usr/local/mysql/bin" > GEM_HOME: "/Users/imorcott/.rvm/gems/ruby-1.9.3-p374" > GEM_PATH: > "/Users/imorcott/.rvm/gems/ruby-1.9.3-p374:/Users/imorcott/.rvm/gems/ruby-1.9.3-p374@global" > MY_RUBY_HOME: "/Users/imorcott/.rvm/rubies/ruby-1.9.3-p374" > IRBRC: "/Users/imorcott/.rvm/rubies/ruby-1.9.3-p374/.irbrc" > RUBYOPT: "" > gemset: "" > > > > > deploy.rb: > > # config/deploy.rb > # Add RVM's lib directory to the load path. > > require 'bundler/capistrano' # Add Bundler integration > load 'deploy/assets' # only for rails 3.1 apps, this makes sure our > assets are precompiled. > > set :application, "DataSimply" > set :deploy_to, "/var/www/#{application}" > set :user, "someusername" > set :password, "somepassword" > set :use_sudo, false > set :rvm_install_with_sudo, true > set :scm, :git > default_run_options[:pty] = true # Must be set for the password prompt > # from git to work > set :repository, "[email protected]:DataSimply/DataSimply-FrontEnd.git" > > > set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"") > set :rvm_type, :system # because the location of rvm is: /usr/local/rvm/ > > set :bundle_without, [:development] > > default_environment["GEM_PATH"] > ="/home/datasimply/.gems/gems/:/home/datasimply/.rvm/gems/ruby-1.9.3-p286/gems/" > > > > default_environment["PATH"] = > "/home/datasimply/.gems/bin/:/home/datasimply/.rvm/gems/ruby-1.9.3-p286/bin/:$PATH" > > 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 > > set :branch, "master" > set :deploy_via, :remote_cache > > before 'deploy:setup', 'rvm:install_rvm' > before 'deploy:setup', 'rvm:install_ruby' > > # https://github.com/wayneeseguin/rvm-capistrano/issues/31 > > require "rvm/capistrano" > require "bundler/capistrano" > require "delayed/recipes" > > load 'deploy/assets' > > after "deploy:update_code", "deploy:migrate" > after "deploy:stop", "delayed_job:stop" > after "deploy:start", "delayed_job:start" > after "deploy:restart", "delayed_job:restart" > > > > Capfile: > load 'deploy' > # Uncomment if you are using Rails' asset pipeline > # load 'deploy/assets' > load 'config/deploy' # remove this line to skip loading any of the default > tasks > > -- -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to [email protected] * To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano?hl=en --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
