I just noticed that as well. On this server setup I forgot to run the
cap deploy:setup command before the deploy:cold.
I am still having issues with the migrations being run under the root
user with no password. Just to get things working I updated the
after "deploy:update_code", "init:database_yml"
I am still getting the migration being performed without a password
which causes things to fail.
If I run deploy:migrations, I get prompted for the database password,
but it still tries to do the migration without the password.
Thanks for the help.
** transaction: commit
* executing `deploy:migrate'
* executing "ls -x /var/rails/my_app/releases"
servers: ["XXX-XXXX.members.linode.com"]
[XXX-XXXX.members.linode.com] executing command
command finished
* executing "cd /var/rails/my_app/releases/20080421151440; rake
RAILS_ENV=production db:migrate"
servers: ["XXX-XXXX.members.linode.com"]
[XXX-XXXX.members.linode.com] executing command
** [out :: XXX-XXXX.members.linode.com] (in /var/rails/my_app/
releases/20080421151440)
** [out :: XXX-XXXX.members.linode.com] rake aborted!
** [out :: XXX-XXXX.members.linode.com] Access denied for user
'root'@'localhost' (using password: NO)
** [out :: XXX-XXXX.members.linode.com]
** [out :: XXX-XXXX.members.linode.com] (See full trace by running
task with --trace)
command finished
command "cd /var/rails/my_app/releases/20080421151440; rake
RAILS_ENV=production db:migrate" failed on XXX-
XXXX.members.linode.com
On Apr 21, 8:41 am, Jamis Buck <[EMAIL PROTECTED]> wrote:
> It looks like you're only creating the database.yml on deploy:setup.
> Perhaps you really want it to be created after deploy:update_code? The
> deploy:setup task is not called as part of the deployment task chain.
>
> - Jamis
>
> On Apr 21, 2008, at 8:36 AM, chris wrote:
>
>
>
> > I don't think that I am going to give any users full access to my
> > database without a password :)
>
> > I understand what is happening, but I am having a hard time
> > understanding why some things are NOT happening, namely prompting me
> > for the db user name and password.
>
> > On Apr 21, 12:37 am, Mason Browne <[EMAIL PROTECTED]> wrote:
> >> That thar is a MySQL error. Make sure your user named "user" has
> >> perms
> >> to access the DB without a password, or make sure to change the creds
> >> within database.yml.
>
> >> On Apr 20, 2008, at 8:48 PM, chris wrote:
>
> >>> After installing the gem I am still getting a similar thing, in
> >>> never
> >>> being prompted for the database password on deployment.
>
> >>> ** [out :: xxxxx.members.linode.com] (in /var/rails/onlinelistings/
> >>> releases/20080421022432)
> >>> ** [out :: xxxxx.members.linode.com] rake aborted!
> >>> ** [out :: xxxxx.members.linode.com] Access denied for user
> >>> 'root'@'localhost' (using password: NO)
>
> >>> Here is my deploy.rb file. Can you see what I am missing?
> >>> ----------
> >>> set :application, "my_app"
> >>> set :repository, "[EMAIL PROTECTED]:me/my_app.git"
> >>> set :domain, "xxxx-xxx.members.linode.com"
>
> >>> default_run_options[:pty] = true # ensures we get a password prompt
> >>> from Git
>
> >>> set :user, "deploy"
> >>> set :runner, "deploy"
>
> >>> set :scm, "git"
> >>> set :scm_passphrase, "XXXX"
> >>> set :branch, "origin/master"
>
> >>> set :deploy_to, "/var/rails/#{application}"
> >>> set :deploy_via, :remote_cache
> >>> ssh_options[:paranoid] = false
> >>> set :use_sudo, false
>
> >>> role :app, domain
> >>> role :web, domain
> >>> role :db, domain, :primary => true
>
> >>> namespace :init do
> >>> desc "create database.yml"
> >>> task :database_yml do
> >>> set :db_user, Capistrano::CLI.ui.ask("database user: ")
> >>> set :db_pass, Capistrano::CLI.password_prompt("database password:
> >>> ")
> >>> database_configuration =<<-EOF
> >>> ---
> >>> login: &login
> >>> adapter: mysql
> >>> database: #{application}
> >>> host: localhost
> >>> username: #{db_user}
> >>> password: #{db_pass}
>
> >>> production:
> >>> <<: *login
> >>> EOF
>
> >>> run "mkdir -p #{shared_path}/config"
> >>> put database_configuration, "#{shared_path}/config/database.yml"
> >>> end
> >>> end
>
> >>> after "deploy:setup", "init:database_yml"
>
> >>> Thanks for the help.
>
> >>> >
>
>
> smime.p7s
> 3KDownload
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---