I am installing Spree in conjunction with spree_auth_devise
<https://github.com/spree/spree_auth_devise>. I am running into a problem
when creating an admin user either through seeding or by running the
command `bundle exec rake spree_auth:admin:create`

Here is the full error message:

     ActiveRecord::StatementInvalid: Mysql2::Error: Unknown column
'roles.name' in 'where clause': SELECT COUNT(DISTINCT `spree_users`.`id`)
FROM `spree_users` LEFT OUTER JOIN `spree_roles_users` ON
`spree_roles_users`.`user_id` = `spree_users`.`id` LEFT OUTER JOIN
`spree_roles` ON `spree_roles`.`id` = `spree_roles_users`.`role_id` WHERE
`roles`.`name` = 'admin'

I have followed these steps to install spree_auth_devise and can confirm
the migrations are created and run successfully:

     bundle exec rake spree_auth:install:migrations
     bundle exec rake db:migrate
     bundle exec rails g spree:auth:install

I receive the error as a result of running this line in seeds.rb:

     Spree::Auth::Engine.load_seed if defined?(Spree::Auth)

I receive the same error when running:

     bundle exec rake spree_auth:admin:create

I have also followed these intructions:
At this point, if you are using spree_auth_devise you will need to
change this line in config/initializers/spree.rb:

Spree.user_class = "Spree::LegacyUser"

To this:

Spree.user_class = "Spree::User"
Here is my schema.rb https://gist.github.com/funkdified/6752c55c73aaf112a2f1

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupspree-user @
postedAug 11, '14 at 11:18a
activeAug 12, '14 at 7:25p

2 users in discussion

Abram Bailey: 1 post Peter Berkenbosch: 1 post



site design / logo © 2021 Grokbase