我无法在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
发布评论