refinery / refinerycms-authentication-devise

Devise based authentication extension for Refinery CMS
MIT License
17 stars 61 forks source link

Installation/Deploy Problems #6

Closed Atastor closed 9 years ago

Atastor commented 9 years ago

Using ruby 2.1.6, rails 4.2.3, current masters of refinerycms and refinerycms-authentication-devise.

When trying to start rails, it fails with

Kaladin:frankenberg michaelp$ rails s
=> Booting WEBrick
=> Rails 4.2.3 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
.../config/initializers/refinery/authentication.rb:2:in `<top (required)>': undefined method `configure' for Refinery::Authentication:Module (NoMethodError)
        from /Users/michaelp/.rvm/gems/ruby-2.1.6/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `load'
        from /Users/michaelp/.rvm/gems/ruby-2.1.6/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `block in load'
        from /Users/michaelp/.rvm/gems/ruby-2.1.6/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
        from /Users/michaelp/.rvm/gems/ruby-2.1.6/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `load'
        from /Users/michaelp/.rvm/gems/ruby-2.1.6/gems/railties-4.2.3/lib/rails/engine.rb:652:in `block in load_config_initializer'
        from /Users/michaelp/.rvm/gems/ruby-2.1.6/gems/activesupport-4.2.3/lib/active_support/notifications.rb:166:in `instrument'
        from /Users/michaelp/.rvm/gems/ruby-2.1.6/gems/railties-4.2.3/lib/rails/engine.rb:651:in `load_config_initializer'
        from /Users/michaelp/.rvm/gems/ruby-2.1.6/gems/railties-4.2.3/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
        from /Users/michaelp/.rvm/gems/ruby-2.1.6/gems/railties-4.2.3/lib/rails/engine.rb:615:in `each'
        from /Users/michaelp/.rvm/gems/ruby-2.1.6/gems/railties-4.2.3/lib/rails/engine.rb:615:in `block in <class:Engine>'
        from /Users/michaelp/.rvm/gems/ruby-2.1.6/gems/railties-4.2.3/lib/rails/initializable.rb:30:in `instance_exec'
        from /Users/michaelp/.rvm/gems/ruby-2.1.6/gems/railties-4.2.3/lib/rails/initializable.rb:30:in `run'
        from /Users/michaelp/.rvm/gems/ruby-2.1.6/gems/railties-4.2.3/lib/rails/initializable.rb:55:in `block in run_initializers'
        from /Users/michaelp/.rvm/rubies/ruby-2.1.6/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
        from /Users/michaelp/.rvm/rubies/ruby-2.1.6/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
        from /Users/michaelp/.rvm/rubies/ruby-2.1.6/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
        from /Users/michaelp/.rvm/rubies/ruby-2.1.6/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
        from /Users/michaelp/.rvm/rubies/ruby-2.1.6/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
        from /Users/michaelp/.rvm/gems/ruby-2.1.6/gems/railties-4.2.3/lib/rails/initializable.rb:44:in `each'

Any silly error spottable?

Thanks Michael

bricesanchez commented 9 years ago

Could you paste your /config/initializers/refinery/authentication.rb config, Gemfile and Gemfile.lock ?

Atastor commented 9 years ago
# encoding: utf-8
Refinery::Authentication.configure do |config|
  # Configure whether to allow superuser to assign roles
  config.superuser_can_assign_roles = true

  # Configure notification email from name
  # config.email_from_name = "no-reply"
end
Atastor commented 9 years ago
GIT
  remote: https://github.com/activescaffold/active_scaffold.git
  revision: 171794e1d8445cbc5c87ddda662654c332cd6e52
  branch: master
  specs:
    active_scaffold (3.4.22)
      rails (>= 3.2.18, < 5)

GIT
  remote: https://github.com/activescaffold/active_scaffold_sortable.git
  revision: 592f1f8641ba5a27e0c79ce4da51fc839bb833e2
  branch: master
  specs:
    active_scaffold_sortable (3.2.9)
      active_scaffold (>= 3.3.0.rc3)

GIT
  remote: https://github.com/airblade/paper_trail.git
  revision: cd4615829415973bcb5e671f2657b4d1656c4584
  branch: master
  specs:
    paper_trail (4.0.0.rc2)
      activerecord (>= 3.0, < 6.0)
      activesupport (>= 3.0, < 6.0)
      request_store (~> 1.1)

GIT
  remote: https://github.com/capistrano/maintenance.git
  revision: b31962d2ac134fae5e2f536380956a1042895c1e
  specs:
    capistrano-maintenance (1.0.0)
      capistrano (>= 3.0)

GIT
  remote: https://github.com/parndt/seo_meta.git
  revision: b03f2b8c7874e2ff05423998e881f6bbc2dddd83
  branch: master
  specs:
    seo_meta (2.0.0.rc.1)
      railties (>= 3.0.0)

GIT
  remote: https://github.com/refinery/refinerycms-blog
  revision: d84600385bcc486241aad4e519164bda62064218
  branch: master
  specs:
    refinerycms-blog (3.0.0)
      acts-as-taggable-on
      filters_spam (~> 0.2)
      friendly_id (~> 5.1.0)
      globalize (>= 4.0.0, < 5.2)
      jquery-ui-rails (~> 5.0.0)
      rails_autolink (~> 1.1.3)
      refinerycms-core (~> 3.0.0)
      refinerycms-settings (~> 3.0.0)
      seo_meta (~> 2.0.0.rc.1)

GIT
  remote: https://github.com/refinery/refinerycms-i18n.git
  revision: ff93ad912c86eb2f1a07a77ac1c75133474f7fea
  branch: master
  specs:
    refinerycms-i18n (3.0.1)
      rails-i18n (~> 4.0.1)
      routing-filter (>= 0.4.0)

GIT
  remote: https://github.com/refinery/refinerycms-page-images.git
  revision: 9b5f16e8266cb3c823c4d310ec3e733245258dde
  branch: master
  specs:
    refinerycms-page-images (3.0.0)
      decorators (~> 2.0.0)
      globalize (~> 5.0)
      refinerycms-pages (~> 3.0.0)

GIT
  remote: https://github.com/refinery/refinerycms-settings.git
  revision: 10c12da53e0c6a793497c43f6cdd2f17a97e9632
  branch: master
  specs:
    refinerycms-settings (3.0.0)
      friendly_id (~> 5.0, >= 5.0.1)
      refinerycms-core (~> 3.0, >= 3.0.0)

GIT
  remote: https://github.com/refinery/refinerycms.git
  revision: 9253deaefe7351913cfbf149033773254361f0f0
  branch: master
  specs:
    refinerycms (3.0.0)
      refinerycms-core (= 3.0.0)
      refinerycms-images (= 3.0.0)
      refinerycms-pages (= 3.0.0)
      refinerycms-resources (= 3.0.0)
    refinerycms-core (3.0.0)
      actionpack (>= 4.1.5, < 5.0)
      activerecord (>= 4.1.5, < 5.0)
      awesome_nested_set (~> 3.0.0)
      coffee-rails (~> 4.0, >= 4.0.0)
      decorators (~> 2.0.0)
      jquery-rails (>= 2.3.0)
      jquery-ui-rails (~> 5.0.0)
      railties (>= 4.1.5, < 5.0)
      refinerycms-i18n (~> 3.0.0)
      sass-rails (>= 4.0, < 5.1)
      truncate_html (~> 0.9)
      will_paginate (~> 3.0.2)
      zilch-authorisation
    refinerycms-images (3.0.0)
      dragonfly (~> 1.0.0)
      refinerycms-core (= 3.0.0)
    refinerycms-pages (3.0.0)
      awesome_nested_set (~> 3.0.0)
      babosa (!= 0.3.6)
      friendly_id (~> 5.1.0)
      globalize (>= 4.0.0, < 5.2)
      refinerycms-core (= 3.0.0)
      seo_meta (~> 2.0.0.rc.1)
      speakingurl-rails (~> 1.1.2)
    refinerycms-resources (3.0.0)
      acts_as_indexed (~> 0.8.0)
      dragonfly (~> 1.0.0)
      refinerycms-core (= 3.0.0)

GIT
  remote: https://github.com/seyhunak/twitter-bootstrap-rails.git
  revision: 935f53bb55ef736260fa2ef04e29da2fc3fb2b3f
  branch: master
  specs:
    twitter-bootstrap-rails (3.2.1)
      actionpack (>= 3.1)
      execjs (>= 2.2.2, >= 2.2)
      less-rails (>= 2.5.0)
      railties (>= 3.1)

PATH
  remote: vendor/extensions
  specs:
    refinerycms-active_scaffold_tables (1.0)
      acts_as_indexed (~> 0.8.0)
      refinerycms-core (~> 3.0.0)

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.2.3)
      actionpack (= 4.2.3)
      actionview (= 4.2.3)
      activejob (= 4.2.3)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 1.0, >= 1.0.5)
    actionpack (4.2.3)
      actionview (= 4.2.3)
      activesupport (= 4.2.3)
      rack (~> 1.6)
      rack-test (~> 0.6.2)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (4.2.3)
      activesupport (= 4.2.3)
      builder (~> 3.1)
      erubis (~> 2.7.0)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    activejob (4.2.3)
      activesupport (= 4.2.3)
      globalid (>= 0.3.0)
    activemodel (4.2.3)
      activesupport (= 4.2.3)
      builder (~> 3.1)
    activerecord (4.2.3)
      activemodel (= 4.2.3)
      activesupport (= 4.2.3)
      arel (~> 6.0)
    activesupport (4.2.3)
      i18n (~> 0.7)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
    acts-as-taggable-on (3.5.0)
      activerecord (>= 3.2, < 5)
    acts_as_indexed (0.8.3)
    acts_as_list (0.7.2)
      activerecord (>= 3.0)
    addressable (2.3.8)
    arel (6.0.2)
    awesome_nested_set (3.0.2)
      activerecord (>= 4.0.0, < 5)
    babosa (1.0.2)
    bcrypt (3.1.10)
    builder (3.2.2)
    byebug (5.0.0)
      columnize (= 0.9.0)
    capistrano (3.2.1)
      i18n
      rake (>= 10.0.0)
      sshkit (~> 1.3)
    capistrano-bundler (1.1.4)
      capistrano (~> 3.1)
      sshkit (~> 1.2)
    capistrano-passenger (0.1.1)
      capistrano (~> 3.0)
    capistrano-rails (1.1.3)
      capistrano (~> 3.1)
      capistrano-bundler (~> 1.1)
    coffee-rails (4.0.1)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.9.1.1)
    colorize (0.7.7)
    columnize (0.9.0)
    commonjs (0.2.7)
    decorators (2.0.1)
      railties (>= 4.0.0, < 5.0.0)
    devise (3.5.1)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 3.2.6, < 5)
      responders
      thread_safe (~> 0.1)
      warden (~> 1.2.3)
    dragonfly (1.0.10)
      addressable (~> 2.3)
      multi_json (~> 1.0)
      rack (>= 1.3.0)
    erubis (2.7.0)
    execjs (2.5.2)
    filters_spam (0.5)
    friendly_id (5.1.0)
      activerecord (>= 4.0.0)
    globalid (0.3.5)
      activesupport (>= 4.1.0)
    globalize (5.0.1)
      activemodel (>= 4.2.0, < 4.3)
      activerecord (>= 4.2.0, < 4.3)
    i18n (0.7.0)
    jbuilder (2.3.1)
      activesupport (>= 3.0.0, < 5)
      multi_json (~> 1.2)
    jquery-rails (4.0.4)
      rails-dom-testing (~> 1.0)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    jquery-ui-rails (5.0.5)
      railties (>= 3.2.16)
    json (1.8.3)
    less (2.6.0)
      commonjs (~> 0.2.7)
    less-rails (2.7.0)
      actionpack (>= 4.0)
      less (~> 2.6.0)
      sprockets (> 2, < 4)
      tilt
    libv8 (3.16.14.11)
    loofah (2.0.2)
      nokogiri (>= 1.5.9)
    mail (2.6.3)
      mime-types (>= 1.16, < 3)
    mime-types (2.6.1)
    mini_portile (0.6.2)
    minitest (5.7.0)
    multi_json (1.11.2)
    mysql2 (0.3.18)
    net-scp (1.2.1)
      net-ssh (>= 2.6.5)
    net-ssh (2.9.2)
    nokogiri (1.6.6.2)
      mini_portile (~> 0.6.0)
    orm_adapter (0.5.0)
    quiet_assets (1.1.0)
      railties (>= 3.1, < 5.0)
    rack (1.6.4)
    rack-test (0.6.3)
      rack (>= 1.0)
    rails (4.2.3)
      actionmailer (= 4.2.3)
      actionpack (= 4.2.3)
      actionview (= 4.2.3)
      activejob (= 4.2.3)
      activemodel (= 4.2.3)
      activerecord (= 4.2.3)
      activesupport (= 4.2.3)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.2.3)
      sprockets-rails
    rails-deprecated_sanitizer (1.0.3)
      activesupport (>= 4.2.0.alpha)
    rails-dom-testing (1.0.6)
      activesupport (>= 4.2.0.beta, < 5.0)
      nokogiri (~> 1.6.0)
      rails-deprecated_sanitizer (>= 1.0.1)
    rails-html-sanitizer (1.0.2)
      loofah (~> 2.0)
    rails-i18n (4.0.4)
      i18n (~> 0.6)
      railties (~> 4.0)
    rails_autolink (1.1.6)
      rails (> 3.1)
    railties (4.2.3)
      actionpack (= 4.2.3)
      activesupport (= 4.2.3)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (10.4.2)
    rdoc (4.2.0)
      json (~> 1.4)
    ref (2.0.0)
    refinerycms-acts-as-indexed (2.0.1)
      acts_as_indexed (~> 0.8.0)
      decorators (~> 2.0.0)
      refinerycms-core (~> 3.0.0)
    refinerycms-authentication-devise (1.0.1)
      actionmailer (~> 4.2, >= 4.2.0)
      devise (~> 3.0, >= 3.2.4)
      friendly_id (~> 5.1.0)
      refinerycms-core (~> 3.0, >= 3.0.0)
    refinerycms-wymeditor (1.0.6)
      refinerycms-core (~> 3.0, >= 3.0.0)
    request_store (1.2.0)
    responders (2.1.0)
      railties (>= 4.2.0, < 5)
    routing-filter (0.5.0)
      actionpack (~> 4.2)
      activesupport (~> 4.2)
    rvm1-capistrano3 (1.3.2.2)
      capistrano (~> 3.0)
      sshkit (>= 1.2)
    sass (3.4.16)
    sass-rails (5.0.3)
      railties (>= 4.0.0, < 5.0)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (~> 1.1)
    sdoc (0.4.1)
      json (~> 1.7, >= 1.7.7)
      rdoc (~> 4.0)
    speakingurl-rails (1.1.5)
      railties (>= 3.1)
    spring (1.3.6)
    sprockets (3.2.0)
      rack (~> 1.0)
    sprockets-rails (2.3.2)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (>= 2.8, < 4.0)
    sqlite3 (1.3.10)
    sshkit (1.7.1)
      colorize (>= 0.7.0)
      net-scp (>= 1.1.2)
      net-ssh (>= 2.8.0)
    therubyracer (0.12.2)
      libv8 (~> 3.16.14.0)
      ref
    thor (0.19.1)
    thread_safe (0.3.5)
    tilt (1.4.1)
    truncate_html (0.9.3)
    turbolinks (2.5.3)
      coffee-rails
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    uglifier (2.7.1)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
    warden (1.2.3)
      rack (>= 1.0)
    will_paginate (3.0.7)
    zilch-authorisation (0.0.1)

PLATFORMS
  ruby

DEPENDENCIES
  active_scaffold!
  active_scaffold_sortable!
  acts_as_list
  byebug
  capistrano (~> 3.2.1)
  capistrano-bundler
  capistrano-maintenance!
  capistrano-passenger
  capistrano-rails
  coffee-rails (~> 4.0.0)
  jbuilder (~> 2.0)
  jquery-rails
  less-rails
  mysql2
  nokogiri
  paper_trail!
  quiet_assets
  rails (~> 4.1)
  refinerycms!
  refinerycms-active_scaffold_tables!
  refinerycms-acts-as-indexed (~> 2.0, >= 2.0.0)
  refinerycms-authentication-devise (~> 1.0.0)
  refinerycms-blog!
  refinerycms-i18n!
  refinerycms-page-images!
  refinerycms-settings!
  refinerycms-wymeditor (~> 1.0, >= 1.0.0)
  rvm1-capistrano3
  sass-rails
  sdoc (~> 0.4.0)
  seo_meta!
  spring
  sqlite3
  therubyracer
  turbolinks
  twitter-bootstrap-rails!
  uglifier (>= 1.3.0)

BUNDLED WITH
   1.10.5
Atastor commented 9 years ago
# -*- coding: utf-8 -*-
source 'https://rubygems.org'

gem 'rails', '~> 4.1'
group :development, :test do
  gem 'sqlite3'
end
group :staging, :production do
  gem 'mysql2'
end

gem 'sass-rails' #, '~> 4.0.3'
#gem "sass", "~> 3.4.0"
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem "less-rails"
gem 'therubyracer',  platforms: :ruby
gem "twitter-bootstrap-rails", git: 'https://github.com/seyhunak/twitter-bootstrap-rails.git', branch: 'master'

gem 'nokogiri'

gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0',          group: :doc
gem 'spring',        group: :development

gem 'capistrano', '~> 3.2.1'
gem 'capistrano-rails'
gem 'rvm1-capistrano3', require: false
gem 'capistrano-maintenance', git: 'https://github.com/capistrano/maintenance.git', require: false
gem 'capistrano-bundler'
gem 'capistrano-passenger'

# debugger replacement for ruby >= 2
gem 'byebug', group: [:development, :test]

gem 'active_scaffold', git: 'https://github.com/activescaffold/active_scaffold.git', branch: 'master'
# gem 'active_scaffold'
gem 'acts_as_list'
gem 'active_scaffold_sortable', git: 'https://github.com/activescaffold/active_scaffold_sortable.git', branch: 'master'

gem 'refinerycms', git: 'https://github.com/refinery/refinerycms.git', branch: 'master'

gem 'refinerycms-i18n', git: 'https://github.com/refinery/refinerycms-i18n.git', branch: 'master'

gem 'quiet_assets'

gem 'refinerycms-acts-as-indexed', ['~> 2.0', '>= 2.0.0']
gem 'refinerycms-wymeditor', ['~> 1.0', '>= 1.0.0']
gem 'seo_meta', git: 'https://github.com/parndt/seo_meta.git', branch: 'master'
gem 'paper_trail', git: 'https://github.com/airblade/paper_trail.git', branch: 'master'
gem 'refinerycms-blog', git: 'https://github.com/refinery/refinerycms-blog', branch: 'master'
gem 'refinerycms-settings', git: 'https://github.com/refinery/refinerycms-settings.git', branch: 'master'
gem 'refinerycms-page-images', git: 'https://github.com/refinery/refinerycms-page-images.git', branch: 'master'
#gem 'refinerycms-page-images', git: 'https://github.com/anitagraham/refinerycms-page-images.git', branch: 'blog-images'
gem 'refinerycms-active_scaffold_tables', path: 'vendor/extensions'
gem 'refinerycms-authentication-devise', '~> 1.0.0'
Atastor commented 9 years ago

Ok, aparently I should have run a generator at some point of the upgrade. The initializer must begin with

# encoding: utf-8
Refinery::Authentication::Devise.configure do |config|

I will see, whether I can write something to enhance the readme with something helpful in this regard. Then I will close the issue.

bricesanchez commented 9 years ago

Refinery::Authentication.configure is the old config constant Refinery::Authentication::Devise.configure is the new since this commit : https://github.com/refinery/refinerycms/commit/357ed473e4bccbfc6f4e728644d0e89a80e3a6c7

Thanks for your help !

parndt commented 9 years ago

We need a deprecation warning on the old method.

parndt commented 9 years ago

@Atastor thanks for filing the issue. Down in my heart I knew that it needed to be properly handled but it slipped through the cracks. Sorry for wasting your time, and I hope the new version 1.0.3 handles this better!

Atastor commented 9 years ago

No need to thank, no need to sorry! Glad I could help and thank YOU foremost!

One more thing: Now the default user class (at least in) refinerycms-blog does not work anymore. It is easily fixable (see below), but might confuse users:

Refinery::Blog.configure do |config|
  # If you're grafting onto an existing app, change this to your User class
  # Refinery::Blog.user_class = "Refinery::User"
  Refinery::Blog.user_class = "Refinery::Authentication::Devise::User"
end
bricesanchez commented 9 years ago

Could you provide us a Pull Request for the blog fix ?

parndt commented 9 years ago

Maybe we need a way to retrieve the current class like Spree has rather than hard coding it