I am following Ryan Bates Rails 4 in episode 400 of Railscasts http://railscasts.com/episodes/400-what-s-new-in-rails-4 . It installs an application to use postgres (which I installed) with a hstore demo. He creates such a scaffold
rails g scaffold article name content:text published_on:date tags properties:hstore
and during migration it
execute "create extension hstore" create_table :articles do |t| t.string :name t.text :content t.date :published_on t.string :tags, array: true t.hstore :properties t.timestamps end
However, when I performed this migration, I received the "hstore" error of the undefined method. Then I went into the test database and created the hstore extension, as shown below (and not in the migration file, as Ryan did)
psql rails4test2_development psql (9.2.3) Type "help" for help. rails4test2_development=
But I got the same error when starting the migration.
undefined method `hstore' for #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::TableDefinition:0x007fa7ee7a9138>/Users/me/Sites/rails4test2/db/migrate/20130511204911_create_articles.rb:9:in `block in change' /Users/me/Sites/rails4test2/db/migrate/20130511204911_create_articles.rb:4:in `change'
Can someone help me understand why this is not working for me?
source share