Error while adding index to rails migration -
I am trying to add an index to a railway migration using the command given below: < pre> and I get this error: If this helps further, then my models are: User class: pins class: Associations were added after creating two domain classes, the user class was generated by the device and the pin, which generated the rail. I saw and the syntax seems right. So why is this error going up? your system console (terminal) instead of this command run rails console or IRB console It should work . generate rail migration Add_user_id_to_pins User_id: integer index
irb (main): 014: 0 & Gt; Generate rail travelers Add_user_id_to_pins User_id: integer index: syntax error: (IRB): 14: syntax error, unexpected tLABEL rails generate migration Add_user_id_to_pins User_id: integer index of C ^: /Ruby200-x64/lib/ruby/gems/2.0.0 / Gemstone / railties-4.1.4 / lib / rail / commands / console.rb: 90: 'starting with `C: /Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.4 / lib / rail / orders / console.rb: 9: /Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks: in `starting from C ' . rb: 69: /Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb :: 40: console C 'Men` in run_command! '/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands.rb :: 17: From' C 'to & lt; Top (required) & gt; 'From Bin / Rail: 4: In' Requirements' from Bin / Rail: 4: `& lt; Main & gt; '
square pins & lt; ActiveRecord :: Base is_to: User End
Comments
Post a Comment