Kyle Kyle - 2 months ago 21
Ruby Question

Syntax error on rake db:schema:dump

I try to connect mysql with ruby, I follow this video
https://www.youtube.com/watch?v=GY7Ps8fqGdc

but on 23:30 in video, I got error with

rake db:schema:dump
,
I have no idea, this is my error:

irb(main):016:0> rake db:schema:dump
SyntaxError: (irb):16: syntax error, unexpected tLABEL
rake db:schema:dump
^
from /usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/console.rb:65:in `start'
from /usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/console_helper.rb:9:in `start'
from /usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:78:in `console'
from /usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

RAJ RAJ
Answer

At the outset, get out of irb console.

rake is a build program, similar to make. Just go to your project directory on terminal and run your rake commands like:

~/apps/myproject$ rake db:schema:dump
Comments