我无法在Ruby on Rails 4.1.4中安装activerecord
。
我已将gem 'activeadmin', github: 'activeadmin'
添加到Gemfile
的末尾并运行bundle install
。它返回0,所以我试图运行rails g active_admin:install
命令,但它返回以下错误:
NameError:未定义的局部变量或方法
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
从'开始' E:/software/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands/console.rb:9: 来自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
控制台' E:/software/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:40:在 来自run_command!' from E:/software/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands.rb:17:in
' E:/ work / projects / src / technical_support_timer / bin / rails:4:require' from E:/work/projects/src/technical_support_timer/bin/rails:4:in
'来自-e:1:inload' from -e:1:in
'
为什么呢?我究竟做错了什么?我该如何解决?
提前致谢。
答案 0 :(得分:2)
IRB可以让您试用Ruby命令或片段并查看即时响应。如果您想安装或更新宝石,我建议您首先运行quit
并按照您手边的说明进行IRB。