当前位置:  开发笔记 > 后端 > 正文

未初始化的常量Sprockets :: Rails(NameError)

如何解决《未初始化的常量Sprockets::Rails(NameError)》经验,为你挑选了1个好方法。

运行rails时出现以下错误.

/home/dev/.rvm/gems/ruby-2.0.0-p643/gems/bootstrap-sass-3.3.6/lib/bootstrap-sass/engine.rb:11:in `block in ': uninitialized constant Sprockets::Rails (NameError)

from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/dev/Desktop/todo/config/environment.rb:5:in `'
from /home/dev/Desktop/todo/config.ru:3:in `block in 
' from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.4.7/lib/rack/builder.rb:51:in `instance_eval' from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.4.7/lib/rack/builder.rb:51:in `initialize' from /home/dev/Desktop/todo/config.ru:in `new' from /home/dev/Desktop/todo/config.ru:in `
' from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.4.7/lib/rack/builder.rb:40:in `eval' from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.4.7/lib/rack/builder.rb:40:in `parse_file' from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.4.7/lib/rack/server.rb:200:in `app' from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/railties-3.2.12/lib/rails/commands/server.rb:46:in `app' from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.4.7/lib/rack/server.rb:304:in `wrapped_app' from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.4.7/lib/rack/server.rb:254:in `start' from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/railties-3.2.12/lib/rails/commands/server.rb:70:in `start' from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/railties-3.2.12/lib/rails/commands.rb:55:in `block in ' from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap' from /home/dev/.rvm/gems/ruby-2.0.0-p643/gems/railties-3.2.12/lib/rails/commands.rb:50:in `' from script/rails:6:in `require' from script/rails:6:in `
'

请帮忙



1> Anna88..:

bootstrap-sass不再与Rails 3兼容.与Rails 3.2兼容的最新版bootstrap-sass是v3.1.1.0.

推荐阅读
爱唱歌的郭少文_
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有