我对铁轨上的红宝石很新。项目工作正常我保存并关闭了盒子。当我重新打开它并尝试运行服务器时,我得到了这个:
/home/action/croquet/config/routes.rb:1:in `<top (required)>': undefined local variable or method `rRails' for main:Object (NameError)
from /home/action/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:241:in `load'
from /home/action/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:241:in `block in load'
from /home/action/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency'
from /home/action/.rvm/gems/ruby-2.1.3/gems/spring-1.2.0/lib/spring/client.rb:26:in `run'
from /home/action/.rvm/gems/ruby-2.1.3/gems/spring-1.2.0/bin/spring:48:in `<top (required)>'
from /home/action/.rvm/gems/ruby-2.1.3/gems/spring-1.2.0/lib/spring/binstub.rb:11:in `load'
from /home/action/.rvm/gems/ruby-2.1.3/gems/spring-1.2.0/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/action/croquet/bin/spring:16:in `require'
from /home/action/croquet/bin/spring:16:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
答案 0 :(得分:0)
rRails
上有拼写错误。它应该是Rails.applications.routes.draw
答案 1 :(得分:0)
输入错误。它应该是Rails
而不是rRails
。