无法在Ruby on Rails 4.1.4中安装activerecord

编程入门 行业动态 更新时间:2024-10-28 20:26:24
本文介绍了无法在Ruby on Rails 4.1.4中安装activerecord的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我无法在Ruby on Rails 4.1.4中安装 activerecord 。

I am unable to install activerecord in Ruby on Rails 4.1.4.

我添加了 gem'activeadmin',github:'activeadmin'至 Gemfile 的末尾并运行 bundle install 。它返回0,所以我尝试运行 rails g active_admin:install 命令,但是它返回以下错误:

I've added gem 'activeadmin', github: 'activeadmin' to the end of Gemfile and run bundle install. It returns 0, so I've tried to run rails g active_admin:install command, but it returns the following error:

NameError:未定义的局部变量或方法 install'for main:(irb)中的对象:中的3 E:/ software / Ruby200 -x64 / lib / ruby​​ / gems / 2.0.0 / gems / railties-4.1.4 / lib / rails / commands / console.rb:90:in 从$ b开始$ b E:/软件/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands/console.rb:9:在 从开始'E:/software/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:69:in console'from E:/software/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands/命令_任务.rb:40:在 run_command!'中中E:/software/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1。 4 / lib / rails / commands.rb:17:来自的 'E:/ work / projects / src / technical_support_t imer / bin / rails:4:in 需要从E:/ work / projects / src / technical_support_timer / bin / rails:4:in 'from -e:1:in load'from -e:1:in '

NameError: undefined local variable or method install' for main:Object from (irb):3 from E:/software/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands/console.rb:90:in start' from E:/software/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands/console.rb:9:in start' from E:/software/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:69:in console' from E:/software/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:40:in run_command!' from E:/software/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands.rb:17:in ' from E:/work/projects/src/technical_support_timer/bin/rails:4:in require' from E:/work/projects/src/technical_support_timer/bin/rails:4:in ' from -e:1:in load' from -e:1:in'

为什么?我究竟做错了什么?我该如何解决?

Why? What am I doing wrong? How can I fix it?

谢谢。

推荐答案

IRB可以为您试用Ruby命令或代码片段,并查看即时响应。如果您想安装或更新gems,建议您先运行 quit 并遵循您手上的任何指示来退出IRB。

IRB is there for you to try out Ruby commands or snippets and see immediate responses. If you want to install or update gems, I suggest you get off IRB first by running quit and follow whatever instructions you have on your hand.

更多推荐

无法在Ruby on Rails 4.1.4中安装activerecord

本文发布于:2023-10-28 22:33:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1537962.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Rails   Ruby   activerecord

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!