database migration - Adding column to rails table -
I'm running Rail 1.9.3 and I wanted to add a column to a previously migrated table. I made the following efforts:
First of all I simply edit the migrate file and add my field and run the Next I tried to run the following command from the Rail Console: To get only the following error: Here is my migrate file: don 'Run the command in the Rail Console, run it from the normal shell in the project directory. rake db: migrate command to see only the following error:
NameError: 'Migrated' method for the undefined local variable or main: Object (IRB): From 13 / Users / Prewomen / RVM / GIMS / RBI-1.9.3-P448 / GIMS / RAI-4.0.0 / LB / RIL / Command / Console RB: 90: 'User / PrawnMode / RVM / Games / RB-1.19.3-P448 / GEMS / Reliance 4.0.0 / Lib / RLI / Order / Console. RB: In 'From' to 9: In / User / Parinemodi / RVM / Games / Ruby-1.9.3-p448 / gems / railties-4.0.0 / lib / rails / commands.rb: 64: in `& lt; From the top (expected) in the 'Start' & gt; 'From Bin / Rail: 4: In' Requirements' from Bin / Rail: 4: `& lt; Main & gt; '
Rail Migration adds to add_place_to_coordinates place: string
Error of name: Undefined local variable or `string 'method for main: Object (IRB): 10 / Users / Prewomen / RVM / Games / Ruby-1.9.3-P448 / Gems / Railways -4.0.0 / Leib / Rail / Order / Console RB: 90: 'User / PrawnMode / Ratna / Railways -4.0.0 / Lib / Rail / Command / Console in 'Initial' from RVM / Games / RB -1.19.3-P448 /. RB: 9: 'User / Prewenmodi /. /lib/rails/commands.rb:64:in` & lt; in `Start 'with RVM / Games / RB-1.19-3-P448 / Games / RAT-4.0.0 Top (required) & gt; 'From Bin / Rail: 4: In' Requirements' from Bin / Rail: 4: `& lt; Main & gt; '
class CreateCoordinates & lt; ActiveRecord :: Create Migration Df Changes _table: What is Coordinate? T | T.float: Latitude T. Float: Longitude t.timestamps end and end
Comments
Post a Comment