<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.
Related
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.
when i try to create conjure account using the command( I am following conjur quickstart tutorial)
docker-compose exec conjur conjurctl account create myConjurAccount > admin_data
i am getting Cipher error in admin_data file,
when i cat admin_data file
rake aborted!
OpenSSL::Cipher::CipherError:
/var/lib/gems/2.5.0/gems/slosilo-2.1.1/lib/slosilo/symmetric.rb:37:in`final'
/var/lib/gems/2.5.0/gems/slosilo-2.1.1/lib/slosilo/symmetric.rb:37:in `decrypt'
/var/lib/gems/2.5.0/gems/slosilo-2.1.1/lib/slosilo/attr_encrypted.rb:60:in `decrypt'
/var/lib/gems/2.5.0/gems/slosilo-2.1.1/lib/slosilo/attr_encrypted.rb:40:in `block (3 levels) in attr_encrypted'
/var/lib/gems/2.5.0/gems/slosilo-2.1.1/lib/slosilo/adapters/sequel_adapter.rb:32:in `get_key'
/var/lib/gems/2.5.0/gems/slosilo-2.1.1/lib/slosilo/keystore.rb:18:in `get'
/var/lib/gems/2.5.0/gems/slosilo-2.1.1/lib/slosilo/keystore.rb:47:in `[]'
/opt/conjur-server/app/models/account.rb:6:in `find_or_create_accounts_resource'
/opt/conjur-server/lib/tasks/account.rake:15:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.5.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
Tasks: TOP => account:create
(See full trace by running task with --trace)
But sometimes its creating i am not understanding what makes it working in the background. Any help will be appreciated.
and also docker-compose ps showing
bot_app tail -F anything Up
conjur_client sleep infinity Up
conjur_server conjurctl server Up 80/tcp
nginx_proxy nginx -g daemon off; Up 0.0.0.0:8443->443/tcp, 80/tcp
postgres_database docker-entrypoint.sh postgres Up 5432/tcp
openssl openssl req -newkey rsa:20 ... Exit 0
Everytime openssl exiting with 0
I have fixed this issue by removing all stopped containers before running the conjure docker container using docker container prune.
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
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.
I am attempting to deploy my Rails 4 app to Heroku, and when I enter:
git push heroku master
I get the following error:
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
From the Rails Asset Pipeline on Heroku Cedar:
This means that your app is attempting to connect to the database as part of rake assets:precompile. Because the config vars are not present in the environment and this is the mechanism the Heroku uses to configure your database connection, the command is failing.
The page suggests that I run
env -i GEM_PATH=$GEM_PATH \
PATH=$PATH \
DATABASE_URL=postgres://user:pass#127.0.0.1/dbname \
/bin/sh -c 'bundle exec rake --trace assets:precompile'
When I do, I get the following error:
rake aborted!
couldn't find HOME environment -- expanding ~'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/guard-2.2.4/lib/guard/guardfile/generator.rb:20:inexpand_path'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/guard-2.2.4/lib/guard/guardfile/generator.rb:20:in <class:Generator>'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/guard-2.2.4/lib/guard/guardfile/generator.rb:9:in'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/guard-2.2.4/lib/guard/guardfile/generator.rb:2:in <module:Guard>'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/guard-2.2.4/lib/guard/guardfile/generator.rb:1:in'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/guard-2.2.4/lib/guard/guardfile.rb:2:in require'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/guard-2.2.4/lib/guard/guardfile.rb:2:in'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/guard-2.2.4/lib/guard/dsl.rb:1:in require'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/guard-2.2.4/lib/guard/dsl.rb:1:in'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/guard-2.2.4/lib/guard.rb:6:in require'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/guard-2.2.4/lib/guard.rb:6:in'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/guard-rspec-4.2.0/lib/guard/rspec.rb:1:in require'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/guard-rspec-4.2.0/lib/guard/rspec.rb:1:in'
/usr/local/rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:81:in require'
/usr/local/rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:81:inrescue in block in require'
/usr/local/rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:66:in block in require'
/usr/local/rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:ineach'
/usr/local/rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in require'
/usr/local/rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler.rb:132:inrequire'
/Users/dmanaster1/flatiron_school/SourceQ-An/config/application.rb:5:in <top (required)>'
/Users/dmanaster1/flatiron_school/SourceQ-An/Rakefile:5:inrequire'
/Users/dmanaster1/flatiron_school/SourceQ-An/Rakefile:5:in <top (required)>'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/rake-10.1.0/lib/rake/rake_module.rb:25:inload'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in load_rakefile'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:637:inraw_load_rakefile'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:94:in block in load_rakefile'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:165:instandard_exception_handling'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:93:in load_rakefile'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:77:inblock in run'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:165:in standard_exception_handling'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:75:inrun'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/gems/rake-10.1.0/bin/rake:33:in <top (required)>'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/bin/rake:23:inload'
/Users/dmanaster1/flatiron_school/SourceQ-An/vendor/cache/ruby/2.0.0/bin/rake:23:in `'
What is generating this error? How can I fix it?
I am unfamiliar with user-env-compile, but just set the Devise key as described here:
heroku config:set DEVISE_SECRET_KEY=whatever_the_key_is
Make sure your initializer then uses the key like this:
config.secret_key = ENV['DEVISE_SECRET_KEY']
Then disable user-env-compile like so:
heroku labs:disable user-env-compile -a myapp
And then try to deploy.