Ruby on Rails:“没有这样的文件或目录”与logger.rb [英] Ruby on Rails: "no such file or directory" with logger.rb
本文介绍了Ruby on Rails:“没有这样的文件或目录”与logger.rb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图首次在本地运行RoR应用程序。我已经启动了服务器,并收到以下错误(在WEBrick启动后):
I'm attempting to run a RoR app locally for the first time. I've started the server and I get the following error (after WEBrick starts):
C:/Ruby/lib/ruby/1.9.1/logger.rb:599:in `initialize': No such file or directory - /dev/null (Errno::ENOENT)
我尝试运行rake db:migrate,并得到相同的错误:
I try to run rake db:migrate and I get the same error:
** Execute environment
rake aborted!
No such file or directory - /dev/null
C:/Ruby/lib/ruby/1.9.1/logger.rb:599:in `initialize'
C:/Ruby/lib/ruby/1.9.1/logger.rb:599:in `open'
C:/Ruby/lib/ruby/1.9.1/logger.rb:599:in `create_logfile'
C:/Ruby/lib/ruby/1.9.1/logger.rb:594:in `open_logfile'
C:/Ruby/lib/ruby/1.9.1/logger.rb:549:in `initialize'
C:/Ruby/lib/ruby/1.9.1/logger.rb:314:in `new'
C:/Ruby/lib/ruby/1.9.1/logger.rb:314:in `initialize'
C:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-3.2.0/lib/active_support/core_ext/logger.rb:72:in `initialize'
我在Windows机器上运行,以防万一。有谁知道这里发生了什么?
I'm running on a Windows machine, in case it helps. Does anyone have any idea what's going on here?
> ruby -v
ruby 1.9.3p0 (2011-10-30) [i386-mingw32]
> rails -v
Rails 3.2.0
推荐答案
/ dev / null文件特定于unix,Windows上没有这样的文件。
/dev/null file is specific to unix, there's no such file on Windows.
这篇关于Ruby on Rails:“没有这样的文件或目录”与logger.rb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文