jamesgolick/friendly — Issue #28: Friendly.create_tables! is not creating tables...
Author: dhruvg
Created: 2011-10-10 06:22:16+00:00
State: open

Hi -- I am pretty new to friendly, just testing it out. I downloaded the gem, updated my gem file, and put the following in my development.rb:

friendly_config = YAML.load(File.read(::Rails.root.to_s + "/config/friendly.yml"))[::Rails.env]
Friendly.configure(friendly_config)
$sequel = Friendly.db
Sequel::MySQL.default_engine = "ndb"
Friendly.create_tables!

I created a model, user.rb:

class User
include Friendly::Document

attribute :first_name, String
attribute :last_name, String
end

My friendly.yaml file is as follows:

development:
:adapter: "mysql2"
:host: "mysql-server-1"
:user: "root"
:password: ""
:database: "voltaire_development"

--
I restart my server, but when I check mysql, the tables have not been created. When I open the rails console and manually execute "Friendly.create_tables!", the response is an empty list, [].

Any ideas why tables aren't being created?

Thanks!