rake migration error MaBase is not a class

I don't found anything on this issue. I create migration like this : rails generate migration MaBase

And I fill the *_ma_base.rb like that

class MaBase < ActiveRecord::Migration   def change       create_table :connexion       add_column :connexion, :ip, :string       add_column :connexion, :user_agent, :string       add_column :connexion, :nb, :integrer       add_column :connexion, :date, :datetime       create_table :recherche       add_column :recherche, :ip, :string       add_column :recherche, :recherche, :string       add_column :recherche, :date, :datetime       create_table :membre       add_column :membre, :ip, :string   end end 

And I get the error.

After reading some subject here, and i create create a file in model ma_base.rb with this kind of code :

class MaBase < ActiveRecord::Base  end 

But the error is stil here

Thanks for support


Change your class name in migration file from MaBase to MaBases. Activerecord maps plural of model names in db files.

Category: ruby on rails Time: 2016-07-28 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.149 (s). 12 q(s)