Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command 'db:setup' not recognized" #413

Open
Daigham opened this issue May 26, 2021 · 0 comments
Open

Command 'db:setup' not recognized" #413

Daigham opened this issue May 26, 2021 · 0 comments

Comments

@Daigham
Copy link

Daigham commented May 26, 2021

When I type rails db:setup, I get below output. Also on below output there is an error message which says ": Command 'db:setup' not recognized"
/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:25: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:108: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:108: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:25: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:25: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:34: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:25: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:108: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:108: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:25: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:25: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:34: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

Error: Command 'db:setup' not recognized

Usage: rails COMMAND [ARGS]

The most common rails commands are:

generate Generate new code (short-cut alias: "g")

console Start the Rails console (short-cut alias: "c")

server Start the Rails server (short-cut alias: "s")

dbconsole Start a console for the database specified in config/database.yml

         (short-cut alias: "db")

new Create a new Rails application. "rails new my_app" creates a

         new application called MyApp in "./my_app"

In addition to those, there are:

destroy Undo code generated with "generate" (short-cut alias: "d")

plugin new Generates skeleton for developing a Rails plugin

runner Run a piece of code in the application environment (short-cut alias: "r")

All commands can be run with -h (or --help) for more information.

🐞 Problem
Also when I run the command rails server, I get below output:
/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:25: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:108: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:108: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:25: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:25: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:34: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:25: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:108: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:108: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:25: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:25: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/bundler-1.15.3/lib/bundler/shared_helpers.rb:34: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.

/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-4.2.8/lib/active_support/core_ext/object/duplicable.rb:111:in <class:BigDecimal>': undefined method new' for BigDecimal:Class (NoMethodError)

from /usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-4.2.8/lib/active_support/core_ext/object/duplicable.rb:106:in `<top (required)>'

from /usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-4.2.8/lib/active_support/core_ext/object.rb:3:in `require'

from /usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-4.2.8/lib/active_support/core_ext/object.rb:3:in `<top (required)>'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails/configuration.rb:2:in `require'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails/configuration.rb:2:in `<top (required)>'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails/railtie.rb:2:in `require'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails/railtie.rb:2:in `<top (required)>'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails/engine.rb:1:in `require'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails/engine.rb:1:in `<top (required)>'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails/application.rb:7:in `require'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails/application.rb:7:in `<top (required)>'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails.rb:11:in `require'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails.rb:11:in `<top (required)>'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails/commands/server.rb:4:in `require'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails/commands/server.rb:4:in `<top (required)>'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails/commands/commands_tasks.rb:123:in `require'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails/commands/commands_tasks.rb:123:in `require_command!'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails/commands/commands_tasks.rb:73:in `server'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails/commands/commands_tasks.rb:39:in `run_command!'

from /usr/local/rvm/gems/ruby-3.0.0/gems/railties-4.2.8/lib/rails/commands.rb:17:in `<top (required)>'

from script/rails:6:in `require'

from script/rails:6:in `<main>'

Looking for a solution please.

🎯 Goal

💡 Possible solutions

📋 Steps to solve the problem
I tried below command:
undle exec rake db:setup
but it did not work.

  • Comment below about what you've started working on.
  • Add, commit, push your changes
  • Submit a pull request and add this in comments - Addresses #<put issue number here>
  • Ask for a review in comments section of pull request
  • Celebrate your contribution to this project 🎉
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant