when i do rake db:setup the rake it's aborted and i don't know why...................... because postgresql is running this is the output of postgreql
fabian#Inna-marley:~$ sudo su - postgres
[sudo] contraseña para fabian:
postgres#Inna-marley:~$ psql
psql (13.0 (Ubuntu 13.0-1.pgdg20.04+1))
Digite «help» para obtener ayuda.
postgres=#
this is the output on my terminar
rake db:setup
rake aborted!
ArgumentError: Write key must be initialized
/home/fabian/.rvm/gems/ruby-2.6.6/gems/analytics-ruby-2.0.13/lib/segment/analytics/client.rb:319:in `check_write_key!'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/analytics-ruby-2.0.13/lib/segment/analytics/client.rb:28:in `initialize'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/analytics-ruby-2.0.13/lib/segment/analytics.rb:14:in `new'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/analytics-ruby-2.0.13/lib/segment/analytics.rb:14:in `initialize'
/home/fabian/rails-backend/config/initializers/analytics_ruby.rb:3:in `new'
/home/fabian/rails-backend/config/initializers/analytics_ruby.rb:3:in `<main>'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:285:in `block in load'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:285:in `load'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/railties-5.2.2.1/lib/rails/engine.rb:657:in `block in load_config_initializer'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.2.1/lib/active_support/notifications.rb:170:in `instrument'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/railties-5.2.2.1/lib/rails/engine.rb:656:in `load_config_initializer'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/railties-5.2.2.1/lib/rails/engine.rb:614:in `block (2 levels) in <class:Engine>'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/railties-5.2.2.1/lib/rails/engine.rb:613:in `each'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/railties-5.2.2.1/lib/rails/engine.rb:613:in `block in <class:Engine>'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/railties-5.2.2.1/lib/rails/initializable.rb:32:in `instance_exec'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/railties-5.2.2.1/lib/rails/initializable.rb:32:in `run'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/railties-5.2.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/railties-5.2.2.1/lib/rails/initializable.rb:50:in `each'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/railties-5.2.2.1/lib/rails/initializable.rb:50:in `tsort_each_child'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/railties-5.2.2.1/lib/rails/initializable.rb:60:in `run_initializers'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/railties-5.2.2.1/lib/rails/application.rb:361:in `initialize!'
/home/fabian/rails-backend/config/environment.rb:5:in `<main>'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `block in require'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `require'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/railties-5.2.2.1/lib/rails/application.rb:337:in `require_environment!'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/railties-5.2.2.1/lib/rails/application.rb:520:in `block in run_tasks_blocks'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/bugsnag-6.18.0/lib/bugsnag/integrations/rake.rb:20:in `execute'
/home/fabian/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/home/fabian/.rvm/gems/ruby-2.6.6/bin/ruby_executable_hooks:24:in `eval'
/home/fabian/.rvm/gems/ruby-2.6.6/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => db:setup => db:schema:load_if_ruby => db:create => db:load_config => environment
(See full trace by running task with --trace)
I'd recommend to start with checking ENV variables, first of all in database.yml.
Related
When trying to deploy a Rails app to Heroku, the deployment is failing with this error in the release logs:
rake aborted!
KeyError: key not found: :secret_key_base
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.4/lib/active_support/encrypted_configuration.rb:11:in `fetch'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.4/lib/active_support/encrypted_configuration.rb:11:in `fetch'
/app/config/initializers/devise.rb:313:in `block (2 levels) in <main>'
/app/vendor/bundle/ruby/2.6.0/gems/devise-jwt-0.8.0/lib/devise/jwt.rb:21:in `jwt'
/app/config/initializers/devise.rb:312:in `block in <main>'
/app/vendor/bundle/ruby/2.6.0/gems/devise-4.7.3/lib/devise.rb:307:in `setup'
/app/config/initializers/devise.rb:11:in `<main>'
/app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
/app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:285:in `block in load'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:257:in `load_dependency'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:285:in `load'
/app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/engine.rb:663:in `block in load_config_initializer'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.4/lib/active_support/notifications.rb:170:in `instrument'
/app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/engine.rb:662:in `load_config_initializer'
/app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
/app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/engine.rb:619:in `each'
/app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/engine.rb:619:in `block in <class:Engine>'
/app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/initializable.rb:32:in `instance_exec'
/app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/initializable.rb:32:in `run'
/app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/initializable.rb:61:in `block in run_initializers'
/app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/initializable.rb:50:in `each'
/app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/initializable.rb:50:in `tsort_each_child'
/app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/initializable.rb:60:in `run_initializers'
/app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/application.rb:361:in `initialize!'
/app/config/environment.rb:5:in `<main>'
/app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:291:in `block in require'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:257:in `load_dependency'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:291:in `require'
/app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/application.rb:337:in `require_environment!'
/app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/application.rb:520:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)
I've tried a few solutions but getting the same error every time. I've created a secrets.yml file like so:
development:
secret_key_base: xxxxxxxxx
test:
secret_key_base: xxxxxxxxx
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
...but that didn't do anything.
I've tried running heroku config:set secret_key_base=xxxxx and then when I run heroku config again indeed the secret_key_base matches. But I still get the error in the release logs when trying to deploy.
Any help is appreciated; I'm completely lost!
When I execute rake db:create command it will display some error's
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
NoMethodError: undefined method `configure' for AjaxDatatablesRails:Module
/home/jsmani/project-folder/config/initializers/ajax_datatables_rails.rb:3:in `<top (required)>'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.7.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.7.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:285:in `block in load'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:285:in `load'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/railties-5.2.6/lib/rails/engine.rb:663:in `block in load_config_initializer'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.6/lib/active_support/notifications.rb:170:in `instrument'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/railties-5.2.6/lib/rails/engine.rb:662:in `load_config_initializer'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/railties-5.2.6/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/railties-5.2.6/lib/rails/engine.rb:619:in `each'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/railties-5.2.6/lib/rails/engine.rb:619:in `block in <class:Engine>'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/railties-5.2.6/lib/rails/initializable.rb:32:in `instance_exec'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/railties-5.2.6/lib/rails/initializable.rb:32:in `run'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/railties-5.2.6/lib/rails/initializable.rb:61:in `block in run_initializers'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/railties-5.2.6/lib/rails/initializable.rb:50:in `each'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/railties-5.2.6/lib/rails/initializable.rb:50:in `tsort_each_child'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/railties-5.2.6/lib/rails/initializable.rb:60:in `run_initializers'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/railties-5.2.6/lib/rails/application.rb:361:in `initialize!'
/home/jsmani/project-folder/config/environment.rb:6:in `<top (required)>'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.7.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.7.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.7.7/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.7.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.7.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/skylight-5.1.0/lib/skylight/probes.rb:167:in `require'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `block in require'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `require'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/railties-5.2.6/lib/rails/application.rb:337:in `require_environment!'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/railties-5.2.6/lib/rails/application.rb:520:in `block in run_tasks_blocks'
/home/jsmani/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/home/jsmani/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `eval'
/home/jsmani/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => db:create => db:load_config => environment
(See full trace by running task with --trace)
In gemfile give some specific version for AjaxDataTablesRails like (gem 'ajax-datatables-rails', '~> 1.0.0') instead of giving (gem 'ajax-datatables-rails') like this.
After save this changes let execute this command (bundle install) on your terminal .
And now you execute rake db:create command .
and do following command rake db:migrate then start your server rails s
I support Rails 4.2.5 application on Ruby 2.5. Packages and rails are ok, but when I run rake assets:precompile I have error.
eric>'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/subscriber.rb:80:in `join'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/subscriber.rb:80:in `initialize'
/var/lib/gems/2.5.0/gems/activerecord-4.2.5/lib/active_record/log_subscriber.rb:19:in `initialize'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/subscriber.rb:33:in `new'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/subscriber.rb:33:in `attach_to'
/var/lib/gems/2.5.0/gems/activerecord-4.2.5/lib/active_record/log_subscriber.rb:75:in `<top (required)>'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.5.0/gems/activerecord-4.2.5/lib/active_record/railties/controller_runtime.rb:2:in `<top (required)>'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.5.0/gems/activerecord-4.2.5/lib/active_record/railtie.rb:138:in `block in <class:Railtie>'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/railtie.rb:194:in `public_send'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/railtie.rb:194:in `method_missing'
/wealthoz/config/environment.rb:5:in `<top (required)>'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/application.rb:328:in `require'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/application.rb:328:in `require_environment!'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/var/lib/gems/2.5.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
I don't deploy intro docker containers on ruby 2.5 image.
If you are on production environment, try RAILS_ENV=production rake assets:precompile
I think you should stick with Ruby 2.3, you could experience many runtime errors with 2.5 (like this one you reported)
Everything working fine on the development environment(C9). However, when it comes to deploying to Heroku, when I try to run 'heroku rake db:migrate', I get the following error message:
breadeat:~/workspace/KNU_Community_Sy_part (master) $ heroku run rake db:migrate
Running rake db:migrate on ⬢ arcane-woodland-11170... up, run.6105 (Free)
rake aborted!
NoMethodError: undefined method `mount' for #<Kcm::Application:0x00000002c99d00>
/app/config/environments/production.rb:2:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/railtie.rb:211:in `instance_eval'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/railtie.rb:211:in `configure'
/app/config/environments/production.rb:1:in `<top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.2/lib/active_support/dependencies.rb:292:in `require'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.2/lib/active_support/dependencies.rb:292:in `block in require'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.2/lib/active_support/dependencies.rb:258:in `load_dependency'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.2/lib/active_support/dependencies.rb:292:in `require'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/engine.rb:599:in `each'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/engine.rb:599:in `block in <class:Engine>'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/initializable.rb:30:in `instance_exec'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/initializable.rb:30:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/initializable.rb:59:in `block in run_initializers'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/initializable.rb:48:in `each'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/initializable.rb:48:in `tsort_each_child'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/initializable.rb:58:in `run_initializers'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/application.rb:353:in `initialize!'
/app/config/environment.rb:5:in `<top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.2/lib/active_support/dependencies.rb:292:in `require'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.2/lib/active_support/dependencies.rb:292:in `block in require'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.2/lib/active_support/dependencies.rb:258:in `load_dependency'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.2/lib/active_support/dependencies.rb:292:in `require'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/application.rb:329:in `require_environment!'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/application.rb:445:in `block in run_tasks_blocks'
/app/vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `load'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:27:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli.rb:360:in `exec'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli.rb:20:in `dispatch'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli.rb:10:in `start'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/exe/bundle:30:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/exe/bundle:22:in `<top (required)>'
/app/bin/bundle:3:in `load'
/app/bin/bundle:3:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
help plz..
my code in github
link_to : https://github.com/sangyeol-kim/KNU_Community_Sy_part
For reference, I have installed the Heroku redis add-on.
In config/environments/production.rb on line 2, change this:
mount ActionCable.server => '/cable'
to this:
config.action_cable.mount_path = "/cable"
I see mount ActionCable.server => '/cable' in config/environments/production.rb
https://github.com/sangyeol-kim/KNU_Community_Sy_part/blob/3dc80e210f3a8d40fb9184877098560c65d3b37f/config/environments/production.rb#L2
Remove that and try it out.
I just cloned one of my repos to a new Mac, everything was fine but then when I try to rake db:create:all or rake db:migrate, I got this error: (I read something about database.yml file but I don't have it in my project and it all worked on another Mac):
rake aborted!
Cannot load `Rails.application.database_configuration`:
Could not load database configuration. No such file - ["config/database.yml"]
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/configuration.rb:110:in `database_configuration'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.2.1/lib/active_record/railtie.rb:117:in `block (2 levels) in <class:Railtie>'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.2.1/lib/active_record/base.rb:316:in `<module:ActiveRecord>'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.2.1/lib/active_record/base.rb:26:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/devise-3.4.1/lib/devise/orm/active_record.rb:3:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/Users/fabrizio/Desktop/SkyWalker/imnotatester/config/initializers/devise.rb:22:in `block in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/devise-3.4.1/lib/devise.rb:293:in `setup'
/Users/fabrizio/Desktop/SkyWalker/imnotatester/config/initializers/devise.rb:3:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
/Users/fabrizio/Desktop/SkyWalker/imnotatester/config/environment.rb:5:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require_environment!'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
Create database.yml in config directory (near application.rb, boot.rb, routes.rb).
# database.yml
development:
encoding: utf8
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
Then call bundle exec rake db:create && bundler exec rake db:migrate,. Hope you have bundler and sqlite3 in the Gemfile.