[英]Active admin install error
尝试运行命令时出现错误:
rails g active_admin:install
错误是:
user @ user1:〜/ projectX $ rails g active_admin:install invoke devise /home/user/.rvm/gems/ruby-2.2.0/bundler/gems/activeadmin-6bde1f57ec5f/lib/generators/active_admin/devise/devise_generator.rb :21:在
rescue in install_devise': uninitialized constant ActiveAdmin::Generators::DeviseGenerator::DependencyError (NameError) from /home/user/.rvm/gems/ruby-2.2.0/bundler/gems/activeadmin-6bde1f57ec5f/lib/generators/active_admin/devise/devise_generator.rb:19:in
中进行rescue in install_devise': uninitialized constant ActiveAdmin::Generators::DeviseGenerator::DependencyError (NameError) from /home/user/.rvm/gems/ruby-2.2.0/bundler/gems/activeadmin-6bde1f57ec5f/lib/generators/active_admin/devise/devise_generator.rb:19:in
install_devise中来自/home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27 :在run' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in
:run' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in
invoke_command' /gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133block in invoke_all' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
/home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation中的block in invoke_all' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
.rb:133:在map' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
map' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
invoke_all'来自/home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/group.rb:232:indispatch' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:115:in
/home/user/.rvm/gems/ruby-2.2 .0 / gems / thor-0.19.1 / lib / thor / group.rb:277:在block in _invoke_for_class_method' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/shell.rb:68:in
中的block in _invoke_for_class_method' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/shell.rb:68:in
with_padding'来自/home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/group.rb:266:in_invoke_for_class_method' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/group.rb:133:in
_invoke_for_class_method':来自/home/user/.rvm/gems的_invoke_from_option_users /ruby-2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:run' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in
/home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133run' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in
invoke_command中:inblock in invoke_all' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
中的block in invoke_all' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
:1block in invoke_all' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
每个'来自/home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133block in invoke_all' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
map' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
来自/home/user/.rvm/gems/ruby-2.2.0/gems/的invoke_all'中dispatch' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in
thor-0.19.1 / lib / thor / group.rb:232:indispatch' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in
从“ /home/user/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/generators开始”dispatch' from /home/user/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in
从invoke' from /home/user/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/generate.rb:13:in
/home/user/.rvm/gems/ruby-2.2.0 /gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:123:inrequire_command!' from /home/user/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:130:in
require_command!' from /home/user/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:130:in
generate_or_destroy' /ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:50generate' from /home/user/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in
run_command中!'' 来自<top (required)>' from /home/user/projectX/bin/rails:8:in
/home/user/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in<top (required)>' from /home/user/projectX/bin/rails:8:in
'来自/home/user/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:inrequire' from /home/user/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
-e:1:in`'
已安装活动的admin和devise gem。 唯一的问题是当我生成活动管理员时。 我使用Rails-4.1.8和ruby-2.1.4。
感谢您的帮助和美好的一天。
您需要将gem'devise gem 'devise'
添加到Gemfile或直接使用cli
bundle add devise
或者您需要使用--skip-users
标志运行安装。
rails g active_admin:install --skip-users
activeadmin
gem(我的意思是rubygems.org上的gem的最新版本)仍然与Rails 4.x不兼容。
尝试从存储库中使用使用最新版本的activeadmin:
gem 'activeadmin', github: 'activeadmin/activeadmin', branch: :master
为我工作。
gem 'devise', '~> 3.2'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.