RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / 问题 / 629443
Accepted
des1roer
des1roer
Asked:2020-02-18 14:38:18 +0800 CST2020-02-18 14:38:18 +0800 CST 2020-02-18 14:38:18 +0800 CST

Ruby ob Rails rake 中止

  • 772
    > rake db:migrate --trace
    rake aborted!
    NameError: undefined local variable or method `__dir__' for main:Object
    F:/OpenServer/domains/localhost/webrails/config/boot.rb:1:in `<top (required)>' F:/OpenServer/domains/localhost/webrails/config/application.rb:1:in `require_relative'
    F:/OpenServer/domains/localhost/webrails/config/application.rb:1:in `<top (required)>'
    F:/OpenServer/domains/localhost/webrails/Rakefile:4:in `require_relative'
    F:/OpenServer/domains/localhost/webrails/Rakefile:4:in `<top (required)>'
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/application.rb:79:in `block in run'
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'

    C:/Ruby19/bin/rake:23:in `load'
    C:/Ruby19/bin/rake:23:in `<main>'

我使用 openserver 和 win10

轨道 -v 轨道 5.0.1

宝石-v 1.8.24

耙耙中止!

windows
  • 1 1 个回答
  • 10 Views

1 个回答

  • Voted
  1. Best Answer
    user181100
    2020-02-18T16:47:28+08:002020-02-18T16:47:28+08:00

    __dir__他抱怨的方法在 Ruby 1.9 中缺失了。

    一般来说,Rails 5 至少需要 2.2.2 版的 Ruby。

    更新。

    • 2

相关问题

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    onMousePressed 在 ScrollPane 上不起作用

    • 2 个回答
  • Marko Smith

    如何关闭jFrame?

    • 1 个回答
  • Marko Smith

    JavaFX someNode.getBoundsInLocal().getHeight() 返回 0.0

    • 1 个回答
  • Marko Smith

    通过绑定更改图像透明度?

    • 1 个回答
  • Marko Smith

    __proto__ 和原型有什么区别?

    • 2 个回答
  • Marko Smith

    阻塞进程直到线程/子进程退出

    • 2 个回答
  • Marko Smith

    如何一键启动浏览器同步

    • 2 个回答
  • Marko Smith

    代码的第一部分有效,但随后无效。我不知道为什么。Python

    • 1 个回答
  • Marko Smith

    给出错误警告:filesize(): stat failed for Chrysanthemum.jpg in D:\OSPanel\domains\test\index.php 在第 2 行

    • 2 个回答
  • Marko Smith

    同时测试包含“!=”运算符的两个条件

    • 3 个回答
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0800 CST
  • Martin Hope
    Алексей Шиманский 如何以及通过什么方式来查找 Javascript 代码中的错误? 2020-08-03 00:21:37 +0800 CST
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0800 CST
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0800 CST
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0800 CST
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0800 CST
  • Martin Hope
    user207618 Codegolf——组合选择算法的实现 2020-10-23 18:46:29 +0800 CST
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0800 CST
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0800 CST
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0800 CST

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5