ruby on rails - Schema dump with pre-existing MySQL database results in NoMethodError -


i've been trying schema dump new rails project using existing mysql database. here's setup in database.yml file:

default: &default   adapter: mysql2   encoding: utf8   pool: 5   username: username_example   password: password_example   host: localhost   socket: /tmp/mysql.sock  development:   <<: *default   database: databasename 

i added following gems gemfile , bundled:

gem 'mysql2' gem 'activerecord-mysql2-adapter' 

after using command rake db:schema:dump following error in schema file:

activerecord::schema.define(version: 0)  # not dump table "tablename" because of following nomethoderror #   undefined method `type' "text":string  end 

any ideas on how fix appreciated, thanks!

i discovered mysql version messing dump. removed activerecord mysql adaptor changed gemfile , dump worked perfectly:

gem 'mysql2', '~> 0.3.13' 

Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -