简体   繁体   English

新的Rails项目,Rails服务器和控制台不起作用

[英]New rails project, rails server and console don't work

I know I'm missing something obvious. 我知道我缺少明显的东西。 I'm using RVM with ruby 1.9.2 and rails 3.0.4. 我正在将RVM与ruby 1.9.2和rails 3.0.4一起使用。 I have a folder called rails_projects that house folders with separate projects. 我有一个名为rails_projects的文件夹,其中包含带有单独项目的文件夹。 Once of my projects works fine, server and console are great. 一旦我的项目正常运行,服务器和控制台就很棒。 I created a new project, bundle installed, and everything seems fine except both server and console give the following error (logger is the name of the application): 我创建了一个新项目,安装了捆绑软件,除了服务器和控制台都出现以下错误(logger是应用程序的名称)之外,其他一切看起来都不错:


/Users/RobertB/rails_projects/logger/config/application.rb:9:in <top (required)>': Logger is not a module (TypeError) from /Users/RobertB/.rvm/gems/ruby-1.9.2-p180@rails3/gems/railties-3.0.4/lib/rails/commands.rb:28:inrequire'
    from /Users/RobertB/.rvm/gems/ruby-1.9.2-p180@rails3/gems/railties-3.0.4/lib/rails/commands.rb:28:in block in <top (required)>' from /Users/RobertB/.rvm/gems/ruby-1.9.2-p180@rails3/gems/railties-3.0.4/lib/rails/commands.rb:27:intap'
    from /Users/RobertB/.rvm/gems/ruby-1.9.2-p180@rails3/gems/railties-3.0.4/lib/rails/commands.rb:27:in <top (required)>' from script/rails:6:inrequire'
    from script/rails:6:in `'

I'm sure I'm making an idiotic mistake, but I just can't get it to work. 我确定我犯了一个愚蠢的错误,但我无法使其正常工作。 Any help will be greatly appreciated! 任何帮助将不胜感激!

The name of your application is conflicting with the name of the Logger class in the Ruby standard library. 您的应用程序名称与Ruby标准库中Logger类的名称冲突。 Use a less generic name for your application and it will work out fine. 为您的应用程序使用一个不太通用的名称,它将正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM