简体   繁体   中英

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. I have a folder called rails_projects that house folders with separate 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):


/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. Use a less generic name for your application and it will work out fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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