views:

14

answers:

1

I am using rails 2.3.9 and I want database dump in sql manner. Here is my environment.rb. Notice the last line where I have

 config.active_record.schema_format =  :sql

Still when I run rake db:schema:dump I see no db/development_structure.sql file.

require File.join(File.dirname(__FILE__), 'boot')

RAILS_GEM_VERSION = '2.3.9' unless defined? RAILS_GEM_VERSION

Rails::Initializer.run do |config|

  config.frameworks -= [:active_resource]

  config.gem 'hoptoad_notifier', :version => '>= 2.3.6'

  config.gem "will_paginate", :version => ">= 2.3.2"

  config.gem "sanitize"


  config.action_mailer.delivery_method = :smtp

  if RAILS_ENV == 'development'  || RAILS_ENV == 'test'

    config.action_mailer.delivery_method = :test

    config.gem "shoulda",  :version => '2.10.2' 

    config.gem 'faker', :version=>'~>0.3'

    config.gem "factory_girl", :version => ">= 1.2.4"

    config.gem "coderay"  

    config.gem "redgreen"
  end

  # Your secret key for verifying cookie session data integrity.
  # If you change this key, all old sessions will become invalid!
  # Make sure the secret is at least 30 characters and all random, 
  # no regular words or you'll be exposed to dictionary attacks.
  config.action_controller.session = {
    :session_key => '_delako_session_v2',
    :secret      => 'd9035d20745f5e3fbe1604a393e59cb4f5e59fd7188cbabe0a5245d84e383cf567f90c3849f2d605d5b05669772b60150f2acb4cfddc897b7361fbfe586bb5c6'
  }

  config.active_record.schema_format =  :sql

end
+3  A: 

rake db:schema:dump explicitly dumps to a db/schema.rb.

If you do rake db:structure:dump you will dump to db/development_structure.sql.

Shadwell
thank you. I was going crazy over this one.
Nadal