So I am trying to do a backup of git from source with this script: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/backup_restore.md ( and the command: sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production)
It works in the beginning but it stops while dumping the repositories.
What do I have to fix?
Dumping repositories ...
rake aborted!
Errno::EEXIST: File exists # dir_s_mkdir - /home/git/gitlab/tmp/backups/repositories
/home/git/gitlab/lib/backup/repository.rb:136:in `prepare'
/home/git/gitlab/lib/backup/repository.rb:8:in `dump'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:69:in `block (4 levels) in <top (required)>'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:12:in `block (3 levels) in <top (required)>'
Tasks: TOP => gitlab:backup:repo:create
(See full trace by running task with --trace)
root#gitlab-test gitlab/public#
The message is very clear! Looks like the directory already exists!
Remove it or move it to a temp location.
To move it
mv /home/git/gitlab/tmp/backups/repositories /home/git/gitlab/tmp/backups/repositories.old
Related
<returncode>FAILED</returncode>
<messageKey>unsupportedRequest</messageKey>
<message>This request is not supported.</message>
</response>```
This is the response from the scalelite server when i enter the URL on browser.
I am getting this message when i try to run
```docker exec -i scalelite-api bundle exec rake db:setup```
ActiveRecord::ProtectedEnvironmentError: You are attempting to run a destructive action against your 'production' database.
If you are sure you want to continue, run the same command with the environment variable:
DISABLE_DATABASE_ENVIRONMENT_CHECK=1
/srv/scalelite/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.6/lib/active_record/tasks/database_tasks.rb:63:in `check_protected_environments!'
/srv/scalelite/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.6/lib/active_record/railties/databases.rake:15:in `block (2 levels) in <main>'
/srv/scalelite/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.6/lib/active_record/railties/databases.rake:404:in `block (3 levels) in <main>'
/srv/scalelite/vendor/bundle/ruby/2.6.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
/usr/bin/bundle:23:in `load'
/usr/bin/bundle:23:in `<main>'
Tasks: TOP => db:schema:load => db:check_protected_environments
(See full trace by running task with --trace)
This is what i get when i enter the command
docker exec -i scalelite-api bundle exec rake status
domain.com enabled online 0 0 0 0
domain.com enabled online 0 0 0 0
Experts please help me with this. I am new to this
I am trying the balance the load between 2 servers.
That's OK. You should check it with https://your.scalelite.com/bigbluebutton/api/ not https://your.scalelite.com.
Please help.
I wanted to set up in Redmine 4.1.1 an email read.
This is my code that I am executing in CLI:
bundle exec rake -f Rakefile --silent redmine:email:receive_imap RAILS_ENV="production" host=outlook.office365.com port=993 username=user#domain.com password=PASSWORD ssl=1 project=mars-test-do-not-delete folder=main move_on_success=completed move_on_failure=failed no_permission_check=1 unknown_user=accept no_account_notice=1 --trace
But I am getting this output when I execute the code:
** Invoke redmine:email:receive_imap (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:email:receive_imap
rake aborted!
NameError: uninitialized constant Redmine::IMAP
/home/seven/redmine/lib/tasks/email.rake:121:in `block (4 levels) in <top (required)>'
/home/seven/redmine/app/models/mailer.rb:630:in `with_synched_deliveries'
/home/seven/redmine/lib/tasks/email.rake:120:in `block (3 levels) in <top (required)>'
/home/seven/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `block in execute'
/home/seven/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `each'
/home/seven/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `execute'
/home/seven/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/home/seven/.rbenv/versions/2.6.0/lib/ruby/2.6.0/monitor.rb:230:in `mon_synchronize'
/home/seven/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/home/seven/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:188:in `invoke'
Tasks: TOP => redmine:email:receive_imap
This is only half of the output.
Any ideas? Suggestions? Anything :)
The SMTP works without any problems. I am using an Exchange MS server for email.
Thank you.
As an update:
I set up a new server ubuntu 20.04 LTS
Installed redmine 4.0.6
Ruby 2.5.0
rake 13.0.1
Now when I run:
rake -f Rakefile --silent redmine:email:receive_imap RAILS_ENV="production" host=outlook.office365.com port=993 username=EMAIL_USER password=PASSWORD ssl=true project=mars-test-do-not-delete folder=main move_on_success=processed move_on_failure=failed no_permission_check=1 unknown_user=accept 1 > /dev/null
I get this:
Your Gemfile lists the gem redmine_crm (>= 0) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.
rake aborted!
NameError: uninitialized constant Redmine::IMAP
/home/seven/redmine/lib/tasks/email.rake:121:in `block (4 levels) in <top (required)>'
/home/seven/redmine/app/models/mailer.rb:612:in `with_synched_deliveries'
/home/seven/redmine/lib/tasks/email.rake:120:in `block (3 levels) in <top (required)>'
/home/seven/.rvm/gems/ruby-2.5.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/home/seven/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:24:in `eval'
/home/seven/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => redmine:email:receive_imap
(See full trace by running task with --trace)
I didi check the redmine_crm, to mu surprise in the Gemfile I have only one reference to it, so I do not fully understand why I get this error to;/
I found the problem.
In file:
/ROOT_PATH_TO_REDMINE/lib/tasks/email.rake
I needed to add one line on the top of the file:
require 'redmine/imap.rb'
That solved the problem.
So I am trying to do bundle install . But it is throwing the below errors. What is the problem here?
bundle exec rake db:create:all
DEPRECATION WARNING: String based terminators are deprecated, please use a lambda. (called from included at /home/.gem/ruby/2.1.3/bundler/gems/authlogic-09163c7d2a9b/lib/authlogic/session/callbacks.rb:66)
DEPRECATION WARNING: String based terminators are deprecated, please use a lambda. (called from included at /home/.gem/ruby/2.1.3/bundler/gems/authlogic-09163c7d2a9b/lib/authlogic/session/callbacks.rb:67)
rake aborted!
Cannot load `Rails.application.database_configuration`:
Could not load database configuration. No such file -
/home/.gem/ruby/2.1.3/gems/railties-4.1.5/lib/rails/application/configuration.rb:105:in `database_configuration'
/home/.gem/ruby/2.1.3/gems/activerecord-4.1.5/lib/active_record/railtie.rb:43:in `block (3 levels) in <class:Railtie>'
Could not load database configuration. No such file -
/home/.gem/ruby/2.1.3/gems/railties-4.1.5/lib/rails/application/configuration.rb:105:in `database_configuration'
/home/.gem/ruby/2.1.3/gems/activerecord-4.1.5/lib/active_record/railtie.rb:43:in `block (3 levels) in <class:Railtie>'
Tasks: TOP => db:create:all => db:load_config
(See full trace by running task with --trace)
Earlier I had tried the below:
rake db:create:all
rake aborted!
Gem::LoadError: You have already activated rake 10.4.2, but your Gemfile requires rake 10.3.2. Prepending `bundle exec` to your command may solve this.
/home/.gem/ruby/2.1.3/gems/bundler-1.7.12/lib/bundler/runtime.rb:34:in `block in setup'
/home/.gem/ruby/2.1.3/gems/bundler-1.7.12/lib/bundler/runtime.rb:19:in `setup'
/home/.gem/ruby/2.1.3/gems/bundler-1.7.12/lib/bundler.rb:122:in `setup'
/home/.gem/ruby/2.1.3/gems/bundler-1.7.12/lib/bundler/setup.rb:7:in `<top (required)>'
/home/project/config/boot.rb:4:in `<top (required)>'
/home/project/config/application.rb:1:in `<top (required)>'
/home/project/Rakefile:4:in `<top (required)>'
LoadError: cannot load such file -- bundler/setup
/home/project/config/boot.rb:4:in `<top (required)>'
/home/project/config/application.rb:1:in `<top (required)>'
/home/project/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
$ bundle exec rake db:create:all
DEPRECATION WARNING: String based terminators are deprecated, please use a lambda. (called from included at /home/.gem/ruby/2.1.3/bundler/gems/authlogic-09163c7d2a9b/lib/authlogic/session/callbacks.rb:66)
DEPRECATION WARNING: String based terminators are deprecated, please use a lambda. (called from included at /home/.gem/ruby/2.1.3/bundler/gems/authlogic-09163c7d2a9b/lib/authlogic/session/callbacks.rb:67)
rake aborted!
Cannot load `Rails.application.database_configuration`:
Could not load database configuration. No such file -
/home/.gem/ruby/2.1.3/gems/railties-4.1.5/lib/rails/application/configuration.rb:105:in `database_configuration'
/home/.gem/ruby/2.1.3/gems/activerecord-4.1.5/lib/active_record/railtie.rb:43:in `block (3 levels) in <class:Railtie>'
Could not load database configuration. No such file -
/home/.gem/ruby/2.1.3/gems/railties-4.1.5/lib/rails/application/configuration.rb:105:in `database_configuration'
/home/.gem/ruby/2.1.3/gems/activerecord-4.1.5/lib/active_record/railtie.rb:43:in `block (3 levels) in <class:Railtie>'
Tasks: TOP => db:create:all => db:load_config
(See full trace by running task with --trace)
You are trying to run "rake db:create:all" which would create your database but as error states - it seems you don't have your config/database.yml file. It's a configuration file that tells rails how to connect to your database. You can read more about it here.
If you really want to run bundle install, just use "bundle install" command instead. This will install all gems listed in your Gemfile.
If you will get problems with rake version conflicts, check out this stack overflow question.
It seems you have no config/database.yml file in your project's directory.
Why I think so? Follow me ...
Could not load database configuration. No such file -
/home/.gem/ruby/2.1.3/gems/railties-4.1.5/lib/rails/application/configuration.rb:105:in `database_configuration'
Ok, let's take a look at this code where we have error:
yaml = Pathname.new(paths["config/database"].existent.first || "")
config = if yaml.exist?
require "yaml"
require "erb"
YAML.load(ERB.new(yaml.read).result) || {}
elsif ENV['DATABASE_URL']
# Value from ENV['DATABASE_URL'] is set to default database connection
# by Active Record.
{}
else
raise "Could not load database configuration. No such file - #{yaml}"
end
As you can see - if no such file or ENV variable then rails throws error.
No idea why but a current already bower-rails installed project can't do bower:install anymore !
As it worked before, I already have packages installed locally.
No idea wht is going one. NO changes as been made !
Tried to reinstall npm and bower, no changes !
rake bower:install
bower.js files generated
/usr/local/bin/bower install -p
bower ENOTFOUND Package dsl-generated dependencies=./vendor/assets/bower.json not found
rake aborted!
Command failed with status (1): [/usr/local/bin/bower install -p ...]
Tasks: TOP => bower:install:production
(See full trace by running task with --trace)
I DO have a bower.json in my /vendor/assets/ directory.
npm -v
1.4.14
bower -v
1.3.11
Here is the full trace:
rake bower:install --trace
** Invoke bower:install (first_time)
** Execute bower:install
** Invoke bower:install:production (first_time)
** Execute bower:install:production
bower.js files generated
/usr/local/bin/bower install -p
bower ENOTFOUND Package dsl-generated dependencies=./vendor/assets/bower.json not found
rake aborted!
Command failed with status (1): [/usr/local/bin/bower install -p ...]
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/file_utils.rb:54:in `block in create_shell_runner'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/file_utils.rb:45:in `call'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/file_utils.rb:45:in `sh'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/tasks/bower.rake:36:in `block (4 levels) in <top (required)>'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:32:in `instance_exec'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:32:in `block in perform'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:57:in `block (2 levels) in dsl_perform_command'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:56:in `chdir'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:56:in `block in dsl_perform_command'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:55:in `each'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:55:in `dsl_perform_command'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:31:in `perform'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/bower-rails/performer.rb:10:in `perform'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/tasks/bower.rake:35:in `block (3 levels) in <top (required)>'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bower-rails-0.8.3/lib/tasks/bower.rake:11:in `block (2 levels) in <top (required)>'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `each'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
./bin/rake:4:in `<main>'
Tasks: TOP => bower:install:production
Same when I try to rake bower:list
rake bower:list
/usr/local/bin/bower list
bower check-new Checking for new versions of the project dependencies..
bower ENOTFOUND Package dsl-generated dependencies=./vendor/assets/bower.json not found
rake aborted!
Command failed with status (1): [/usr/local/bin/bower list...]
Tasks: TOP => bower:list
(See full trace by running task with --trace)
Maybe too late, but I'll leave it here, since I had similar issues using bower-rails, when running:
rake bower:install.
The solution I found on the web is running:
sudo apt-get install nodejs-legacy
Hope it's helpful for someone else in the same situation.
you can install nodejs by nvm, apt-get can't install all packages of nodejs.
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
source ~/.profile
nvm install v0.12.7
npn install bower -g
rake bower:install
In my case, our codebase used private Bower packages hosted on Gemfury. We enabled this by adding
"resolvers": [
"fury-bower-resolver"
]
to the repo's .bowerrc. This setting is only supported in Bower 1.7.x. My global bower binary was 1.7.2, so I had no problems running bower install, but the rake bower:install tasks doesn't use my global bower; it uses my_repo/node_modules/.bin/bower instead, and that one was version 1.4.2, which didn't understand the resolvers setting, hence the 'package not found' error. You can see which binary it's using in one of the first log output lines; then you can invoke that binary with -v to see which version it's on. The fix was to upgrade the Bower binary that bower-rails uses with npm upgrade bower (needless to say, don't add the -g option!)
Try deleting the vendor directory and re-running rake bower:install.
P.S. Before deleting please check what else is inside vendor directory besides bower_components - you may have to reinstall those as well.
I have problems with getting db:structure:dump to work.
I and getting this error:
C:\Sites\care>rake db:structure:dump --trace
Creating scope :search. Overwriting existing method PgSearch::Document.search.
** Invoke db:structure:dump (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:structure:dump
rake aborted!
Permission denied - pg_dump -i -s -x -O -f C:/Sites/care/db/structure.sql care_development
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.1/lib/active_record/railties/databases.rake:389:in `block (3 levels) in <top (required)>'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
C:/RailsInstaller/Ruby1.9.3/bin/rake:19:in `load'
C:/RailsInstaller/Ruby1.9.3/bin/rake:19:in `<main>'
Tasks: TOP => db:structure:dump
If I run it like this in CMD, it works:
cd C:\Program Files (x86)\PostgreSQL\9.1\bin
pg_dump.exe -i -s -x -O -f C:/Sites/care/db/structure.sql care_development
I have tried changing the permission on both the pg_dump.exe folder/file and the rails folder/files. But doesn't seem to make any different. Tried adding full permissions for Users, System and even Everyone.
I also tried adding --username params to the pg_dump call (in the rake code) and adding Login Roles that match my windows user in pgAdminIII.
(I'm on Windows 7, Rails 3 and postgreSQL 9)
Do anyone know what the problem can be?
I have same problem on my Linux machine:
Then i used the following command to make it run:
su
>> I logged in first with my Admin user
su -postgres
I save my .sql file in my /tmp folder
For dumping the .sql file in database i run the command
psql -u postgres -d my_db_name -a -f /tmp/path_to_sql_file
It works greatly for me. Hope it may help you.