0

getting error on running cmd in windows Please help me what to do: here is rake

# Add your own tasks in files placed in lib/tasks ending in .rake,
# for
example lib/tasks/capistrano.rake, and they will automatically be available to 
Rake.
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'

and here is the cmd window

c:\Fedena>rake db:create --trace
(in c:/Fedena)
rake aborted!
c:/Fedena/Rakefile:3: syntax error, unexpected kAND
...lib/tasks/capistrano.rake, and they will automatically be av...
                              ^
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in `load_rakefile'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
C:/Ruby187/bin/rake:23:in `load'
C:/Ruby187/bin/rake:23
arpit Pathak
  • 47
  • 1
  • 2
  • 10

2 Answers2

1

Shouldn't this part be commented out?

    # Add your own tasks in files placed in lib/tasks ending in .rake,
# for
#example lib/tasks/capistrano.rake, and they will automatically be available to 
#Rake.


require(File.join(File.dirname(__FILE__), 'config', 'boot'))


require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'

Looks like it's not commented out and ruby is trying to run it as code

arpit Pathak
  • 47
  • 1
  • 2
  • 10
Joel Blum
  • 7,750
  • 10
  • 41
  • 60
  • I have try to comment out this too but it still not working – arpit Pathak Feb 05 '17 at 07:28
  • I dont know which file it is instructing to automatically available – arpit Pathak Feb 05 '17 at 07:29
  • please copy and paste your entire rakefile.rake – Joel Blum Feb 05 '17 at 07:31
  • # Add your own tasks in files placed in lib/tasks ending in .rake, # for #example lib/tasks/capistrano.rake, and they will automatically be available to #Rake. require(File.join(File.dirname(__FILE__), 'config', 'boot')) require 'rake' require 'rake/testtask' require 'rake/rdoctask' require 'tasks/rails' – arpit Pathak Feb 05 '17 at 14:29
0

My installation is successful. Below is my rake file content:

# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require(File.join(File.dirname(__FILE__), 'config', 'boot'))

require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'

require 'tasks/rails'

Copy and paste the above content in your rake file and try again

Fokwa Best
  • 3,322
  • 6
  • 36
  • 51