On Tuesday, April 28, 2015 at 6:23:51 PM UTC-4, Vell wrote: > > Versions: > > - Ruby 2.1.5 > - Capistrano 3.3.5 > - Rails 4.1.9 > > Platform: > > - Working on.... Mac OS X 10.10.3 > - Deploying to... Ubuntu 14.04 > > Logs: > > - https://gist.github.com/vmcilwain/0ce0a3757223061f1cfc > > Files: > > - Capfile - https://gist.github.com/vmcilwain/49269443ec80718b3fa9 > - deploy.rb - https://gist.github.com/vmcilwain/090b6d7677cd0a8b30eb > - Stage files (production.rb, staging.rb) - > https://gist.github.com/vmcilwain/ec5966ec54486da6b215 > > Background: > > I have an app that I am working on that I started with > Centos/Apache/MYSQL. I am using capistrano 3.3.5 to deploy this app and I > am not having any issues with deploying which includes migrating the db. > > Issue: > > I am now moving to Ubuntu/Nginx/MYSQL and still using capistrano 3.3.5 to > deploy this app but now I am having issues migrating the db. From what I > can tell, capistrano thinking that I am wanting to migrate to a db that is > on the local system but there isn't one. The DB is located on an RDS > instance on Amazon AWS. > > I have tried to forcefully set rails_env but nothing appears to get > capistrano to recognize the environment I want to deploy to. > > To double check my issue I have created a brand new application which has > no other code. I installed what I think is the bare minimum for getting my > rails app to deploy and this issue also occurs. > > I am looking for some advice on anything else that I can try to get past > this issue. Any help is greatly appreciated.\ > > Thanks >
As I am picking around with things, it seems that anything that I set in deploy.rb isn't recognized by any of my files in lib/capistrano/tasks. For instance, if I have the following in deploy.rb set :running_dir, File.dirname(__FILE__) I am not able to use fetch(:running_dir) in /lib/capistrano/tasks/nginx.rb in a method such as desc "create #{fetch(:application)} nginx.conf" task :generate_nginx_conf do on roles(:app) do info "creating #{fetch(:application)} nginx.conf file" open(fetch(:nginx_conf_file), 'w') do |f| f.puts(ERB.new(File.read(fetch(:running_dir) + "/templates/nginx.conf.erb")).result(binding)) end end end However, fetch(:application) is working without any issue. I can see that in the info string when capistrano runs. I don't know if this relates to my issue or how to correct it at this moment. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/89bad802-92d8-448b-acc9-74c0fa6e44ab%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.