错误//未初始化的常量Sass :: Rails :: Application(NameError)] //运行'rails server'时

时间:2012-10-17 16:51:51

标签: ruby-on-rails ruby

当我去运行服务器时,我收到此错误:

C:\Users\myusername\sass>rails server
C:/Users/myusername/sass/config/application.rb:13:in `<module:Sass>': uninitialized 
constant Sass::Rails::Application (NameError)
        from C:/Users/myusername/sass/config/application.rb:12:in `<top (required)
>'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/comman
ds.rb:53:in `require'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/comman
ds.rb:53:in `block in <top (required)>'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/comman
ds.rb:50:in `tap'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/comman
ds.rb:50:in `<top (required)>'
        from script/rails:6:in `require'
        from script/rails:6:in `<main>'

1 个答案:

答案 0 :(得分:1)

Sass是一个Ruby库,顺便说一句,它也被Ruby使用。您应该为Rails应用程序使用不同的名称。

再次运行生成器并选择其他名称,例如myproject或其他任何名称(Ruby模块除外)。