我添加了twitter-bootstrap-rails gem并进行了bundle install.然后我去做:
rails g bootstrap:install
这似乎不起作用,并说它找不到发电机.
Could not find generator bootstrap:install.
我在轨道上3.1.为什么这不起作用?
编辑:嘿不确定你是否想要整个gemfile,但这里是:
source 'http://rubygems.org' gem 'rails','3.1.0' gem 'sorcery' gem 'heroku' gem 'will_paginate' gem "pg",:group => :production gem 'sqlite3' gem 'acts_as_api' gem 'taps' gem 'twitter-bootstrap-rails' # Bundle edge Rails instead: # gem 'rails',:git => 'git://github.com/rails/rails.git' # Gems used only for assets and not required # in production environments by default. group :assets do gem 'sass-rails'," ~> 3.1.0" gem 'coffee-rails',"~> 3.1.0" gem 'uglifier' end gem 'jquery-rails' # Use unicorn as the web server # gem 'unicorn' # Deploy with Capistrano # gem 'capistrano' group :development do # To use debugger gem 'ruby-debug19',:require => 'ruby-debug' end group :test do # Pretty printed test output gem 'turn',:require => false end
和宝石清单:
*** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.1.0,3.0.7,3.0.1,3.0.0) actionpack (3.1.0,3.0.0) activeadmin (0.3.2) activemodel (3.1.0,3.0.0) activerecord (3.1.0,3.0.0) activerecord-jdbc-adapter (1.2.0) activerecord-jdbcMysqL-adapter (1.2.0) activerecord-jdbcsqlite3-adapter (1.2.0) activeresource (3.1.0,3.0.0) activesupport (3.1.1,3.1.0,3.0.0) acts_as_api (0.3.11) addressable (2.2.6) annotate-models (1.0.4) ansi (1.4.1,1.3.0) archive-tar-minitar (0.5.2) arel (2.2.1,2.0.9,1.0.1) autotest (4.3.2) autotest-fsevent (0.2.4) autotest-growl (0.2.9) autotest-rails-pure (4.1.0) bcrypt-ruby (3.0.1) builder (3.0.0,2.1.2) bundler (1.0.12) chronic (0.6.4) cocaine (0.2.0) coffee-rails (3.1.1) coffee-script (2.2.0) coffee-script-source (1.1.3,1.1.2) columnize (0.3.5,0.3.4) commonjs (0.2.0) cucumber (1.1.0) daemons (1.1.3) devise (1.4.8) diff-lcs (1.1.3,1.1.2) erubis (2.7.0,2.6.6) eventmachine (0.12.10) execjs (1.2.9) factory_girl (1.3.3) factory_girl_rails (1.0) faker (0.3.1) faraday (0.7.5,0.6.1) fastercsv (1.5.4) formtastic (1.2.4) gherkin (2.5.2) gravatar_image_tag (0.1.0) has_scope (0.5.1) heroku (2.15.1,2.8.5) hike (1.2.1) i18n (0.6.0,0.5.0,0.4.2) inherited_resources (1.2.2) jdbc-MysqL (5.1.13) jdbc-sqlite3 (3.7.2) jquery-rails (1.0.19,1.0.18,1.0.16) json (1.6.3,1.6.1) kaminari (0.12.4) launchy (2.0.5) less (2.0.8) less-rails (2.0.1) libv8 (3.3.10.4 x86_64-darwin-10) linecache19 (0.5.12) log4r (1.1.9) macaddr (1.4.0) mail (2.3.0,2.2.19) Meta_search (1.1.1,1.1.0.pre,0.9.8) mime-types (1.17.2,1.16) multi_json (1.0.4,1.0.3) multi_xml (0.4.1) multipart-post (1.1.4,1.1.3) net-ldap (0.2.2) nokogiri (1.5.0,1.4.4) oa-basic (0.3.0) oa-core (0.3.0) oa-enterprise (0.3.0) oa-more (0.3.0) oa-oauth (0.3.0) oa-openid (0.3.0) oauth (0.4.5) oauth-plugin (0.4.0.pre7) oauth2 (0.5.1,0.4.1) omniauth (0.3.0) orm_adapter (0.0.5) paperclip (2.4.4) pg (0.11.0) polyamorous (0.5.0) polyglot (0.3.3,0.3.2,0.3.1) pyu-ruby-sasl (0.0.3.3) rack (1.3.5,1.3.4,1.2.4,1.2.2) rack-cache (1.0.3) rack-mount (0.8.3,0.6.14) rack-openid (1.3.1) rack-ssl (1.3.2) rack-test (0.6.1,0.5.7) rails (3.1.0,3.0.0) railties (3.1.0,3.0.0) rake (0.9.2.2,0.9.2,0.8.7) rdoc (3.11,3.10) responders (0.6.4) rest-client (1.6.7) rspec (2.6.0,2.0.1) rspec-core (2.6.4,2.0.1) rspec-expectations (2.6.0,2.0.1) rspec-mocks (2.6.0,2.0.1) rspec-rails (2.6.1.beta1,2.0.1) ruby-debug-base19 (0.11.25) ruby-debug19 (0.11.6) ruby-openid (2.1.8) ruby-openid-apps-discovery (1.2.0) ruby_core_source (0.1.5) rubygems-update (1.7.2) rubyntlm (0.1.1) rubyzip (0.9.5,0.9.4) sass (3.1.11,3.1.10) sass-rails (3.1.5,3.1.4,3.1.0) sequel (3.20.0) sinatra (1.0) sorcery (0.7.5) spork (0.8.4) sprockets (2.0.3,2.0.2) sqlite3 (1.3.4,1.3.3) sqlite3-ruby (1.3.3,1.2.5) sys-uname (0.8.6,0.8.5) systemu (2.2.0) taps (0.3.23) term-ansicolor (1.0.7,1.0.6) therubyracer (0.9.9) thin (1.2.11) thor (0.14.6) tilt (1.3.3) treetop (1.4.10,1.4.9) turn (0.8.3) twitter-bootstrap-rails (1.4.0) tzinfo (0.3.31,0.3.30,0.3.27) uglifier (1.1.0,1.0.3) uuid (2.3.4) warden (1.0.6) webrat (0.7.1) will_paginate (3.0.2,3.0.pre2) XMLCanonicalizer (1.0.1)
解决方法
看看你的gem文件,我认为你需要指定一个bootstrap gem的版本,特别是v1.3.0或之前:
https://rubygems.org/gems/twitter-bootstrap-rails/versions/1.3.0
检查该依赖关系与当前版本1.4.1的相关性.或者,升级到rails 3.1.1.