Skip to content

Instantly share code, notes, and snippets.

@mrbrdo
Created March 24, 2011 06:35
Show Gist options
  • Save mrbrdo/884667 to your computer and use it in GitHub Desktop.
Save mrbrdo/884667 to your computer and use it in GitHub Desktop.
Running: cd "/Users/apple/reftest" && /Users/apple/.rvm/rubies/ruby-1.8.7-p334/bin/ruby -S rails generate refinerycms
/Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/refinerycms-core-0.9.9.10/lib/generators/refinerycms_generator.rb:16:in `generate': undefined method `root' for Refinery:Module (NoMethodError)
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/thor-0.14.6/lib/thor/task.rb:22:in `send'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/thor-0.14.6/lib/thor/shell.rb:14:in `map'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/thor-0.14.6/lib/thor/core_ext/ordered_hash.rb:75:in `each'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/railties-3.0.5/lib/rails/generators.rb:163:in `invoke'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/railties-3.0.5/lib/rails/commands/generate.rb:10
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
from /Users/apple/.rvm/gems/ruby-1.8.7-p334/gems/railties-3.0.5/lib/rails/commands.rb:17
from script/rails:6:in `require'
from script/rails:6
Failed to generate application.
Message: Could not run the refinerycms generator successfully.
Exiting...
@mremolt
Copy link

mremolt commented Mar 24, 2011

Try locking 'refinerycms-generators' to 1.0.0:

gem 'refinerycms-generators', '= 1.0.0'

Fixed it for me, as the new 1.0.1 breaks this generator.

@mrbrdo
Copy link
Author

mrbrdo commented Mar 24, 2011

Do you mean after running the "refinerycms" generator and it fails, I change this in gemfile and run bundle, then run "rails g refinerycms"?

@mremolt
Copy link

mremolt commented Mar 24, 2011

Correct!

Exact steps:
In Gemfile insert the line from my last comment
run "bundle"
run "rails g refinerycms"

That worked for me.

Besides, I added an issue on github for this problem: https://github.com/resolve/refinerycms-generators/issues/#issue/12

@kallisti5
Copy link

same issue here on ruby 1.9.2 / rails 3.0.5

To fix this I had to:
add gem 'refinerycms-generators', '= 1.0.0' to gemfile
run bundle update refinerycms-generators
run bundle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment