Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 5.1 Refinery::Resources.datastore_root_path - undefined method #19

Open
glapworth opened this issue Aug 22, 2018 · 4 comments
Open

Comments

@glapworth
Copy link

I tried to install this gem into a brand new refinerycms app. Following the instructions in the README, I added the line at the bottom of my Gemfile. The gem installation was successful, but when I attempt to run rails generate refinery:jobs or start the development server, I get the following error:

rails generate refinery:jobs
/usr/local/rvm/gems/ruby-2.4.0@rails51/bundler/gems/refinerycms-jobs-41fb9042edb9/lib/refinery/jobs/dragonfly.rb:14:in `block in configure!': undefined method `datastore_root_path' for Refinery::Resources:Module (NoMethodError)
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/dragonfly-1.1.5/lib/dragonfly/configurable.rb:51:in `instance_eval'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/dragonfly-1.1.5/lib/dragonfly/configurable.rb:51:in `configure'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/dragonfly-1.1.5/lib/dragonfly/configurable.rb:89:in `configure'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/bundler/gems/refinerycms-jobs-41fb9042edb9/lib/refinery/jobs/dragonfly.rb:12:in `configure!'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/bundler/gems/refinerycms-jobs-41fb9042edb9/lib/refinery/jobs/engine.rb:12:in `block in <class:Engine>'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/railties-5.1.6/lib/rails/initializable.rb:30:in `instance_exec'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/railties-5.1.6/lib/rails/initializable.rb:30:in `run'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/railties-5.1.6/lib/rails/initializable.rb:59:in `block in run_initializers'
        from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each'
        from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:347:in `each'
        from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:347:in `call'
        from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component'
        from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
        from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/railties-5.1.6/lib/rails/initializable.rb:58:in `run_initializers'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/railties-5.1.6/lib/rails/application.rb:353:in `initialize!'
        from /Users/glapworth/tmp/etwebsite/config/environment.rb:5:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `block in require'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in `load_dependency'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/railties-5.1.6/lib/rails/application.rb:329:in `require_environment!'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/railties-5.1.6/lib/rails/command/actions.rb:16:in `require_application_and_environment!'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/railties-5.1.6/lib/rails/commands/generate/generate_command.rb:19:in `perform'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/railties-5.1.6/lib/rails/command/base.rb:63:in `perform'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/railties-5.1.6/lib/rails/command.rb:44:in `invoke'
        from /usr/local/rvm/gems/ruby-2.4.0@rails51/gems/railties-5.1.6/lib/rails/commands.rb:16:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

Is there something I am doing wrong?

@bricesanchez
Copy link
Member

Hi @glapworth!

What is your refinerycms version?

It could be caused by the extraction of Dragonfly since 4.0 refinery/refinerycms#3289 or the s3 config bug recently merged : refinery/refinerycms#3392

@glapworth
Copy link
Author

Thanks for getting back to me @bricesanchez

My version of refinery is

gem 'refinerycms', '~> 4.0'
refinerycms (4.0.2)
refinerycms-core (= 4.0.2)
refinerycms-images (= 4.0.2)
refinerycms-pages (= 4.0.2)
refinerycms-resources (= 4.0.2)

Perhaps a downgrade is required on my end for the time being?

@bricesanchez
Copy link
Member

refinerycms-jobs looks like to be not compatible with Refinery 4.0 and more.

Downgrading refinerycms is not a good idea, we should update this extension because we are working on refinerycms 5.0.

@icodeat9
Copy link

refinerycms-jobs looks like to be not compatible with Refinery 4.0 and more.

Downgrading refinerycms is not a good idea, we should update this extension because we are working on refinerycms 5.0.

@bricesanchez Hi, Brice, I just created a new PR, a WIP upgrade to RefineryCMS 4.0 (Rails 5.1+)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants