我是rails的新手,必须支持新项目,对这个愚蠢的问题感到抱歉。
我需要在主站点上创建新页面,而不是在管理面板中,尝试“rails generate controller Impulse index”,就像在tutotial中一样,但是得到了错误:
/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:80:在`救援中阻止(2级)在''中:尝试加载宝石'activeadmin'时出错。 (捆扎机:: GemRequireError)
完全错误
/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:80:in
rescue in block (2 levels) in require': There was an error while trying to load the gem 'activeadmin'. (Bundler::GemRequireError) from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:76:in
块(2级)in require' 来自/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:72:ineach' from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:72:in
阻止在'需要' 来自/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:61:ineach' from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:61:in
require' 来自/usr/lib/ruby/vendor_ruby/bundler.rb:99:inrequire' from /home/deploy/20171102/staytrue/config/application.rb:7:in
' 来自/var/lib/gems/2.3.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:141:inrequire' from /var/lib/gems/2.3.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:141:in
require_application_and_environment!' 来自/var/lib/gems/2.3.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:128:ingenerate_or_destroy' from /var/lib/gems/2.3.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:50:in
generate' 来自/var/lib/gems/2.3.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:inrun_command!' from /var/lib/gems/2.3.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in
' 来自bin / rails:8:require' from bin/rails:8:in
'
答案 0 :(得分:0)
按照以下步骤操作:
删除gemfile.lock(rm Gemfile.lock
)
删除activeadmin gem(gem uninstall activeadmin
)
捆绑安装/更新
用于测试irb / rails c:
require 'activeadmin'