Why isn't my rake command working? I've posted what happens in my MAC OSX terminal

361 Views Asked by At

As you can see below, I ran rake db:mirgate and the errors below spit out. This happens even though I have a rakefile in my application.

Nate-Air:proj Nate$ rake db:migrate

rake aborted!

No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, 
Rakefile.rb)

/Users/Nate/.rvm/gems/ruby-2.4.1@global/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'

/Users/Nate/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `eval'

/Users/Nate/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `<main>'

(See full trace by running task with --trace)

Nate-Air:proj Nate$ 
1

There are 1 best solutions below

0
On

lscommand result is nothing, it is not project root.
You have to stay the root directory of your project.
Move to your project root.

How to create a generic rails project: 1. rails new some_project 2. cd some_project 3. bundle install 4. bundle exec rake db:migrate