当我尝试访问我的rails服务器时出现以下问题:
无法启动Web应用程序。 Phusion Passenger列出了以下更多信息。
undefined method `<<' for false:FalseClass (NoMethodError)
/usr/local/rvm/gems/ruby-2.1.2/gems/bootstrap-sass-3.1.1.1/lib/bootstrap-sass/engine.rb:5:in `block in <class:Engine>'
/usr/local/rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
/usr/local/rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
/usr/local/rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each'
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `call'
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
/usr/local/rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
/usr/local/rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
/var/www/html/qqportal/config/environment.rb:5:in `<top (required)>'
config.ru:3:in `require'
config.ru:3:in `block in <main>'
/usr/local/rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
/usr/local/rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/local/rvm/gems/ruby-2.1.2/gems/passenger-4.0.50/helper-scripts/rack-preloader.rb:112:in `eval'
/usr/local/rvm/gems/ruby-2.1.2/gems/passenger-4.0.50/helper-scripts/rack-preloader.rb:112:in `preload_app'
/usr/local/rvm/gems/ruby-2.1.2/gems/passenger-4.0.50/helper-scripts/rack-preloader.rb:158:in `<module:App>'
/usr/local/rvm/gems/ruby-2.1.2/gems/passenger-4.0.50/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/usr/local/rvm/gems/ruby-2.1.2/gems/passenger-4.0.50/helper-scripts/rack-preloader.rb:28:in `<main>'
任何想法?
谢谢!
答案 0 :(得分:0)
查看堆栈跟踪和错误消息,我怀疑你指定了:
app.config.assets.precompile = false
在config/environments/production.rb
中。 但这不是它的工作原理。
你正在使用的宝石,bootstrap-saas
appends the array应该在那里:
app.config.assets.precompile << %r(bootstrap/glyphicons-halflings-regular\.(?:eot|svg|ttf|woff)$)
如果你怀疑precompile=false
,那就解释了你为什么会这样做:
undefined method `<<' for false:FalseClass (NoMethodError)
有关如何在production.rb中配置app.config.assets.precompile
的详细信息,请参阅Asset Pipeline Rails Guide