pushtype / push_type

PushType is a modern, open source content management system for Ruby on Rails.
http://www.pushtype.org
Other
290 stars 32 forks source link

undefined method `extension_enabled?' for #<CreatePushTypeUsers:0x007fd7c0482520> #24

Closed joeczucha closed 7 years ago

joeczucha commented 7 years ago

I'm trying to install this on a cleanly generated Rails 5 project using the rails-5 branch.

$ rails g push_type:install
Running via Spring preloader in process 69661
Expected string default value for '--jbuilder'; got true (boolean)
      create  config/initializers/push_type.rb
      insert  config/routes.rb
- Copying migrations
        rake  railties:install:migrations
Copied migration 20161207011436_create_push_type_users.push_type.rb from push_type
Copied migration 20161207011437_create_push_type_nodes.push_type.rb from push_type
Copied migration 20161207011438_create_push_type_node_hierarchies.push_type.rb from push_type
Copied migration 20161207011439_create_push_type_assets.push_type.rb from push_type
Copied migration 20161207011440_add_field_store_default_values.push_type.rb from push_type
Copied migration 20161207011441_drop_legacy_push_type_taxonomies.push_type.rb from push_type
Copied migration 20161207011442_devise_extend_push_type_users.push_type_auth.rb from push_type_auth
- Running migrations
        rake  db:migrate
== 20161207011436 CreatePushTypeUsers: migrating ==============================
-- extension_enabled?("uuid-ossp")
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

undefined method `extension_enabled?' for #<CreatePushTypeUsers:0x007fd7c0482520>
/Users/joe/Sites/#labs/pushtype/db/migrate/20161207011436_create_push_type_users.push_type.rb:4:in `change'
NoMethodError: undefined method `extension_enabled?' for #<CreatePushTypeUsers:0x007fd7c0482520>
/Users/joe/Sites/#labs/pushtype/db/migrate/20161207011436_create_push_type_users.push_type.rb:4:in `change'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

Any suggestions appreciated :)

aaronrussell commented 7 years ago

Hey @joeczucha, make sure your generated app uses the postgresql database adapter. PushType requires postgres because it uses the jsonb datatype.

joeczucha commented 7 years ago

Thanks @aaronrussell, it had been a long day.

That's got me past the first issue but now - once migrations are complete and a user has been generated - visiting the admin URL gives me:

couldn't find file './webpack/admin.bundle' under '/Users/joe/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/bundler/gems/push_type-7d85d68e3016/admin/app/assets/javascripts' with type 'application/javascript'

I've followed the steps from here: http://www.pushtype.org/docs/installation/ is there another step for the rails-5 branch?

Thanks for your help.

aaronrussell commented 7 years ago

Ah, looks like you're installing from git? That's not supported right now. The compiled javascript assets are not committed to git so you need to install from a version published on ruby gems (currently version 0.10.0).

In future I'll sort this out and commit the compiled assets because a few trip over on this.

joeczucha commented 7 years ago

No problem, I just wasn’t sure if the Rubygems version supported Rails 5 but I’ll give it a go.

Thanks!