bootstrap:主题在简单的脚手架上失败 [英] bootstrap:themed fails on simple scaffold

查看:14
本文介绍了bootstrap:主题在简单的脚手架上失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有仅具有标题属性的帖子脚手架的 rails 应用程序.一切看起来都不错,但是当我尝试使用 Twitter Bootstrap 为脚手架设置主题时,它引发了以下错误:

I've got a rails app with a posts scaffold that has just a title attribute. Everything looks okay, but when I try to use Twitter Bootstrap to theme the scaffold, it throws up the following error:

rails g bootstrap:themed posts

/Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.0/lib/active_support/inflector/methods.rb:226:in `const_defined?': wrong constant name post (NameError)
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.0/lib/active_support/inflector/methods.rb:226:in `block in constantize'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.0/lib/active_support/inflector/methods.rb:225:in `each'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.0/lib/active_support/inflector/methods.rb:225:in `constantize'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.0/lib/active_support/core_ext/string/inflections.rb:54:in `constantize'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/twitter-bootstrap-rails-2.0.4/lib/generators/bootstrap/themed/themed_generator.rb:58:in `columns'
from (erb):6:in `template'
from /Users/templeb3/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/erb.rb:838:in `eval'
from /Users/templeb3/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/erb.rb:838:in `result'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/actions/file_manipulation.rb:111:in `block in template'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/actions/create_file.rb:54:in `call'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/actions/create_file.rb:54:in `render'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/actions/create_file.rb:47:in `identical?'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/actions/create_file.rb:73:in `on_conflict_behavior'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:111:in `invoke_with_conflict_check'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/actions/create_file.rb:61:in `invoke!'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/actions.rb:95:in `action'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/actions/create_file.rb:26:in `create_file'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/actions/file_manipulation.rb:110:in `template'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/twitter-bootstrap-rails-2.0.4/lib/generators/bootstrap/themed/themed_generator.rb:86:in `block in generate_erb'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/twitter-bootstrap-rails-2.0.4/lib/generators/bootstrap/themed/themed_generator.rb:85:in `each'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/twitter-bootstrap-rails-2.0.4/lib/generators/bootstrap/themed/themed_generator.rb:85:in `generate_erb'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/twitter-bootstrap-rails-2.0.4/lib/generators/bootstrap/themed/themed_generator.rb:81:in `generate_views'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/twitter-bootstrap-rails-2.0.4/lib/generators/bootstrap/themed/themed_generator.rb:19:in `copy_views'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `block in invoke_all'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `each'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.0/lib/rails/generators.rb:170:in `invoke'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.0/lib/rails/commands/generate.rb:12:in `<top (required)>'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require'
from /Users/templeb3/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.0/lib/rails/commands.rb:29:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

提供 -f 参数会导致相同的行为

suppying the -f argument causes the same behavior

推荐答案

rails g bootstrap:themed Posts

这篇关于bootstrap:主题在简单的脚手架上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆