无法在Ruby on Rails 4.1.4中安装activerecord [英] Unable to install activerecord in Ruby on Rails 4.1.4

查看:85
本文介绍了无法在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:在
<$ c $中c>从
开始'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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆