Rake is not working. The error states that there is a problem calling rake due to RVM.
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
I've screenshot the problem.
Rake is not working. The error states that there is a problem calling rake due to RVM.
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
I've screenshot the problem.
Look at the Rails
project structure
--project_name
--app
--bin
--config
--db
--lib
--log
--public
--test
--tmp
--vendor
--config.ru
--Gemfile
--Gemfile.loc
>>--Rakefile
--READNE.md
When I run rake -t
without project then it's showing the error like
:~/workspace $ rake -t
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/usr/local/rvm/gems/ruby-2.3.4/gems/rake-12.3.1/lib/rake/application.rb:698:in `raw_load_rakefile'
/usr/local/rvm/gems/ruby-2.3.4/gems/rake-12.3.1/lib/rake/application.rb:104:in `block in load_rakefile'
/usr/local/rvm/gems/ruby-2.3.4/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-2.3.4/gems/rake-12.3.1/lib/rake/application.rb:103:in `load_rakefile'
/usr/local/rvm/gems/ruby-2.3.4/gems/rake-12.3.1/lib/rake/application.rb:82:in `block in run'
/usr/local/rvm/gems/ruby-2.3.4/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-2.3.4/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
/usr/local/rvm/gems/ruby-2.3.4/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.4/bin/rake:22:in `load'
/usr/local/rvm/gems/ruby-2.3.4/bin/rake:22:in `<main>'
/usr/local/rvm/gems/ruby-2.3.4/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.3.4/bin/ruby_executable_hooks:15:in `<main>'
but when I run rake -t
inside Rails
project then it's working like
:~/workspace/recipies (master) $ rake -t
** Invoke default (first_time)
** Invoke test (first_time)
** Execute test
** Execute default
Run options: --seed 14039
# Running:
..E
That means on your hand the Rakefile
not found anywhere. SO you need to run this inside project where Rakefile
exists.
Note: You can use rake -t
or rails -t
. Since Rails 5.0+
has rake
commands built into the rails
executable, bin/rails
is the new default for running commands.
rake
in a folder that's not configured to userake
, then you'll see that error. (Which makes total sense -- what else could you expect to see, other than an error?)rake
for use within a new project, then you can start by runningrake init
, or just by writing aRakefile
manually - as shown in the README: github.com/ruby/rake#usage~
) of your computer), is that you may just need to change directory (cd
) into the folder that your rails project is in, before runningrake
. Also, by the way, the command you're looking for israke -T
, notrake -t
.rvm get stable
<top (required)>' /home/dave/Co/config/application.rb:1:in
require_relative' /home/dave/Co/config/application.rb:1:in<top (required)>' /home/dave/Co/Rakefile:4:in
require_relative' /home/dave/Co/Rakefile:4:in<top (required)>' /usr/local/rvm/gems/ruby-2.5.1@global/gems/rake-12.3.0/exe/rake:27:in
<top (required)>' "