1

我正在尝试安装 Pageflow(最新 v.0.6.0)并在输入以下内容后出现此错误rails generate install:pageflow

/Library/Ruby/Gems/2.0.0/gems/pageflow-0.6.0/admins/pageflow/membership.rb:11:in `block (2 levels) in <module:Pageflow>': uninitialized constant Pageflow::User (NameError)
from /Users/uron/.bundler/ruby/2.0.0/active_admin-7d477d1bf249/lib/active_admin/dsl.rb:75:in `class_eval'
from /Users/uron/.bundler/ruby/2.0.0/active_admin-7d477d1bf249/lib/active_admin/dsl.rb:75:in `controller'
from /Library/Ruby/Gems/2.0.0/gems/pageflow-0.6.0/admins/pageflow/membership.rb:9:in `block in <module:Pageflow>'
from /Users/uron/.bundler/ruby/2.0.0/active_admin-7d477d1bf249/lib/active_admin/dsl.rb:16:in `instance_eval'
from /Users/uron/.bundler/ruby/2.0.0/active_admin-7d477d1bf249/lib/active_admin/dsl.rb:16:in `run_registration_block'
from /Users/uron/.bundler/ruby/2.0.0/active_admin-7d477d1bf249/lib/active_admin/namespace.rb:213:in `parse_registration_block'
from /Users/uron/.bundler/ruby/2.0.0/active_admin-7d477d1bf249/lib/active_admin/namespace.rb:48:in `register'
from /Users/uron/.bundler/ruby/2.0.0/active_admin-7d477d1bf249/lib/active_admin/application.rb:117:in `register'
from /Users/uron/.bundler/ruby/2.0.0/active_admin-7d477d1bf249/lib/active_admin.rb:72:in `register'
from /Library/Ruby/Gems/2.0.0/gems/pageflow-0.6.0/admins/pageflow/membership.rb:2:in `<module:Pageflow>'
from /Library/Ruby/Gems/2.0.0/gems/pageflow-0.6.0/admins/pageflow/membership.rb:1:in `<top (required)>'
from /Users/uron/.bundler/ruby/2.0.0/active_admin-7d477d1bf249/lib/active_admin/application.rb:168:in `block in load!'
from /Users/uron/.bundler/ruby/2.0.0/active_admin-7d477d1bf249/lib/active_admin/application.rb:168:in `each'
from /Users/uron/.bundler/ruby/2.0.0/active_admin-7d477d1bf249/lib/active_admin/application.rb:168:in `load!'
from /Users/uron/.bundler/ruby/2.0.0/active_admin-7d477d1bf249/lib/active_admin/application.rb:186:in `routes'
from /Users/uron/.bundler/ruby/2.0.0/active_admin-7d477d1bf249/lib/active_admin.rb:76:in `routes'
from /Users/uron/Desktop/onyva/git/suitcase-web/x/config/routes.rb:2:in `block in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:341:in `instance_exec'
from /Library/Ruby/Gems/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:341:in `eval_block'
from /Library/Ruby/Gems/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:319:in `draw'
from /Users/uron/Desktop/onyva/git/suitcase-web/x/config/routes.rb:1:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `each'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:102:in `reload_routes!'
from /Users/uron/.bundler/ruby/2.0.0/active_admin-7d477d1bf249/lib/active_admin/application.rb:241:in `block in attach_reloader'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:387:in `_run__3068857999573267334__prepare__callbacks'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:80:in `run_callbacks'
from /Library/Ruby/Gems/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/reloader.rb:74:in `prepare!'
from /Library/Ruby/Gems/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/reloader.rb:46:in `prepare!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/application/finisher.rb:50:in `block in <module:Finisher>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/uron/Desktop/onyva/git/suitcase-web/x/config/environment.rb:5:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

rails server 会给我同样的。

我的 Gemfile 看起来像这样:

gem 'rails', '4.0.2' gem 'ransack' gem 'inherited_resources', '1.4.1' gem 'formtastic', '2.3.0' gem 'nokogiri', '1.5.5' gem 'resque-scheduler', '2.5.5' gem 'pageflow' gem 'activeadmin', git: 'https://github.com/codevise/active_admin.git', branch: 'rails4' gem 'cancan' gem 'friendly_id', '~> 5.1.0' gem 'paperclip' gem 'marionette-rails' gem 'devise'

感谢您的任何想法!只需填写这些行,因为我的帖子中似乎有太多代码。

4

0 回答 0