seyhunak / twitter-bootstrap-rails

Twitter Bootstrap for Rails 6.0, Rails 5 - Rails 4.x Asset Pipeline
https://github.com/seyhunak/twitter-bootstrap-rails
4.5k stars 998 forks source link

I can't generate bootstrap-theme. #845

Open shiratsu opened 9 years ago

shiratsu commented 9 years ago

Hi,there.

I'm sorry for suddenly posting. I want to use bootstrap-theme on rails project. But i couldn't.

I tryed to use bootstrap-theme without model. Then i got error.

{15-03-22 7:55}MBP-15JAC-105:~/some_test shhirats% rails g controller Products index
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
Ignoring dep-selector-libgecode-1.0.2 because its extensions are not built.  Try: gem pristine dep-selector-libgecode-1.0.2
Ignoring dep_selector-1.0.3 because its extensions are not built.  Try: gem pristine dep_selector-1.0.3
Ignoring ffi-1.9.3 because its extensions are not built.  Try: gem pristine ffi-1.9.3
Ignoring ffi-yajl-1.1.0 because its extensions are not built.  Try: gem pristine ffi-yajl-1.1.0
Ignoring hitimes-1.2.2 because its extensions are not built.  Try: gem pristine hitimes-1.2.2
Ignoring libyajl2-1.0.1 because its extensions are not built.  Try: gem pristine libyajl2-1.0.1
Ignoring mysql2-0.3.16 because its extensions are not built.  Try: gem pristine mysql2-0.3.16
Ignoring nio4r-1.0.0 because its extensions are not built.  Try: gem pristine nio4r-1.0.0
      create  app/controllers/products_controller.rb
       route  get 'products/index'
      invoke  erb
      create    app/views/products
      create    app/views/products/index.html.erb
      invoke  test_unit
      create    test/controllers/products_controller_test.rb
      invoke  helper
      create    app/helpers/products_helper.rb
      invoke    test_unit
      create      test/helpers/products_helper_test.rb
      invoke  assets
      invoke    coffee
      create      app/assets/javascripts/products.js.coffee
      invoke    scss
      create      app/assets/stylesheets/products.css.scss
{15-03-22 7:56}MBP-15JAC-105:~/some_test shhirats% rails g bootstrap:install
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
      insert  app/assets/javascripts/application.js
      create  app/assets/javascripts/bootstrap.js.coffee
      create  app/assets/stylesheets/bootstrap_and_overrides.css.less
      create  config/locales/en.bootstrap.yml
        gsub  app/assets/stylesheets/application.css
{15-03-22 7:57}MBP-15JAC-105:~/some_test shhirats% rails g bootstrap:layout
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
    conflict  app/views/layouts/application.html.erb
Overwrite /Users/shhirats/some_test/app/views/layouts/application.html.erb? (enter "h" for help) [Ynaqdh] Y
       force  app/views/layouts/application.html.erb
{15-03-22 7:57}MBP-15JAC-105:~/some_test shhirats% rails g bootstrap:themed products -f
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.1.8/lib/active_support/inflector/methods.rb:238:in `const_get': uninitialized constant Product (NameError)
    from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.1.8/lib/active_support/inflector/methods.rb:238:in `block in constantize'
    from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.1.8/lib/active_support/inflector/methods.rb:236:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.1.8/lib/active_support/inflector/methods.rb:236:in `inject'
    from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.1.8/lib/active_support/inflector/methods.rb:236:in `constantize'
    from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.1.8/lib/active_support/core_ext/string/inflections.rb:66:in `constantize'
    from /Library/Ruby/Gems/2.0.0/gems/twitter-bootstrap-rails-3.2.0/lib/generators/bootstrap/themed/themed_generator.rb:87:in `block in retrieve_columns'
    from /Library/Ruby/Gems/2.0.0/gems/twitter-bootstrap-rails-3.2.0/lib/generators/bootstrap/themed/themed_generator.rb:101:in `rescue_block'
    from /Library/Ruby/Gems/2.0.0/gems/twitter-bootstrap-rails-3.2.0/lib/generators/bootstrap/themed/themed_generator.rb:86:in `retrieve_columns'
    from /Library/Ruby/Gems/2.0.0/gems/twitter-bootstrap-rails-3.2.0/lib/generators/bootstrap/themed/themed_generator.rb:58:in `columns'
    from (erb):9:in `template'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb:849:in `eval'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb:849:in `result'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:116:in `block in template'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:53:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:53:in `render'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:46:in `identical?'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:72:in `on_conflict_behavior'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:113:in `invoke_with_conflict_check'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:60:in `invoke!'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:25:in `create_file'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:115:in `template'
    from /Library/Ruby/Gems/2.0.0/gems/twitter-bootstrap-rails-3.2.0/lib/generators/bootstrap/themed/themed_generator.rb:132:in `block in generate_erb'
    from /Library/Ruby/Gems/2.0.0/gems/twitter-bootstrap-rails-3.2.0/lib/generators/bootstrap/themed/themed_generator.rb:131:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/twitter-bootstrap-rails-3.2.0/lib/generators/bootstrap/themed/themed_generator.rb:131:in `generate_erb'
    from /Library/Ruby/Gems/2.0.0/gems/twitter-bootstrap-rails-3.2.0/lib/generators/bootstrap/themed/themed_generator.rb:117:in `generate_views'
    from /Library/Ruby/Gems/2.0.0/gems/twitter-bootstrap-rails-3.2.0/lib/generators/bootstrap/themed/themed_generator.rb:21:in `copy_views'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.8/lib/rails/generators.rb:157:in `invoke'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.8/lib/rails/commands/generate.rb:11:in `<top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:135:in `generate_or_destroy'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:51:in `generate'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.8/lib/rails/commands.rb:17:in `<top (required)>'
    from /Users/shhirats/some_test/bin/rails:8:in `<top (required)>'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from -e:1:in `<main>'

But,I used theme after creating model.I could use theme.

{15-03-22 7:58}MBP-15JAC-105:~/some_test shhirats% rails g model Product name:string price:integer released_on:date
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
      invoke  active_record
      create    db/migrate/20150321233956_create_products.rb
      create    app/models/product.rb
      invoke    test_unit
      create      test/models/product_test.rb
      create      test/fixtures/products.yml
{15-03-22 8:39}MBP-15JAC-105:~/some_test shhirats% rails g bootstrap:themed Product -f
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
Could not find table 'products'
{15-03-22 8:40}MBP-15JAC-105:~/some_test shhirats% rake db:migrate
== 20150321233956 CreateProducts: migrating ===================================
-- create_table(:products)
   -> 0.0012s
== 20150321233956 CreateProducts: migrated (0.0013s) ==========================

{15-03-22 8:40}MBP-15JAC-105:~/some_test shhirats% rails g bootstrap:themed Product -f
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
       force  app/views/product/index.html.erb
      create  app/views/product/new.html.erb
      create  app/views/product/edit.html.erb
      create  app/views/product/_form.html.erb
      create  app/views/product/show.html.erb

if i want to use 'rails g bootstrap:themed',i can't use theme,right? I also want to use theme without model.

Best regards.