Giter Site home page Giter Site logo

seyhunak / twitter-bootstrap-rails Goto Github PK

View Code? Open in Web Editor NEW
4.5K 187.0 1.0K 4.02 MB

Twitter Bootstrap for Rails 6.0, Rails 5 - Rails 4.x Asset Pipeline

Home Page: https://github.com/seyhunak/twitter-bootstrap-rails

Ruby 30.06% HTML 63.75% CoffeeScript 0.05% Haml 3.08% Slim 3.07%
twitter-bootstrap-rails bootstrap bootstrap-generator rails-gem

twitter-bootstrap-rails's Introduction

Twitter Bootstrap for Rails 6, 5 and 4 Asset Pipeline

Bootstrap is a toolkit from Twitter designed to kickstart development of web apps and sites. It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more.

twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for Rails Asset Pipeline (Rails 6, Rails 5 and Rails 3.x versions are supported)

Gem Version Dependency Status Code Climate Coverage Status GitHub stars GitHub forks GitHub issues

OpenCollective OpenCollective

Screencasts

Installing twitter-bootstrap-rails, generators, usage and more

Screencasts provided by RailsCasts (Ryan Bates)

Twitter Bootstrap Basics in this episode you will learn how to include Bootstrap into Rails application with the twitter-bootstrap-rails gem.

More on Twitter Bootstrap in this episode continues on the Bootstrap project showing how to display flash messages, add form validations with SimpleForm, customise layout with variables, and switch to using Sass. (Note: This episode is pro episode)

Installing the Gem

The Twitter Bootstrap Rails gem can provide the Bootstrap stylesheets in two ways.

The plain CSS way is how Bootstrap is provided on the official website.

The Less way provides more customisation options, like changing theme colors and provides useful Less mixins for your code, but requires the Less gem and the Ruby Racer Javascript runtime (not available on Microsoft Windows).

Installing the Less stylesheets

To use Less stylesheets, you'll need the less-rails gem, and one of JavaScript runtimes supported by CommonJS.

Include these lines in the Gemfile to install the gems from RubyGems.org:

gem "therubyracer"
gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
gem "twitter-bootstrap-rails"

or you can install from latest build;

gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'

Then run bundle install from the command line:

bundle install

Then run the bootstrap generator to add Bootstrap includes into your assets:

rails generate bootstrap:install less

If you need to skip coffeescript replacement into app generators, use:

rails generate bootstrap:install --no-coffeescript

Installing the CSS stylesheets

If you don't need to customize the stylesheets using Less, the only gem you need is the twitter-bootstrap-rails gem:

gem "twitter-bootstrap-rails"

After running bundle install, run the generator:

rails generate bootstrap:install static

If your Rails server is running, make sure to restart it.

Generating layouts and views

You can run following generators to get started with Bootstrap quickly.

Layout (generates Bootstrap compatible layout) - (Haml and Slim supported)

Usage:

rails g bootstrap:layout [LAYOUT_NAME]

Themed (generates Bootstrap compatible scaffold views.) - (Haml and Slim supported)

Usage:

rails g bootstrap:themed [RESOURCE_NAME]

Example:

rails g scaffold Post title:string description:text
rake db:migrate
rails g bootstrap:themed Posts

Notice the plural usage of the resource to generate bootstrap:themed.

Using with Less

Bootstrap was built with Preboot, an open-source pack of mixins and variables to be used in conjunction with Less, a CSS preprocessor for faster and easier web development.

Using stylesheets with Less

You have to require Bootstrap LESS (bootstrap_and_overrides.css.less) in your application.css

/*
 *= require bootstrap_and_overrides
 */

/* Your stylesheets goes here... */

To use individual components from bootstrap, your bootstrap_and_overrides.less could look like this:

// Core variables and mixins
@import "twitter/bootstrap/variables.less";
@import "twitter/bootstrap/mixins.less";

// Reset and dependencies
@import "twitter/bootstrap/normalize.less";
@import "twitter/bootstrap/print.less";
//@import "twitter/bootstrap/glyphicons.less"; // Excludes glyphicons

// Core CSS
@import "twitter/bootstrap/scaffolding.less";
@import "twitter/bootstrap/type.less";
@import "twitter/bootstrap/code.less";
@import "twitter/bootstrap/grid.less";
@import "twitter/bootstrap/tables.less";
@import "twitter/bootstrap/forms.less";
@import "twitter/bootstrap/buttons.less";

// Components
@import "twitter/bootstrap/component-animations.less";
@import "twitter/bootstrap/dropdowns.less";
@import "twitter/bootstrap/button-groups.less";
@import "twitter/bootstrap/input-groups.less";
@import "twitter/bootstrap/navs.less";
@import "twitter/bootstrap/navbar.less";
@import "twitter/bootstrap/breadcrumbs.less";
@import "twitter/bootstrap/pagination.less";
@import "twitter/bootstrap/pager.less";
@import "twitter/bootstrap/labels.less";
@import "twitter/bootstrap/badges.less";
@import "twitter/bootstrap/jumbotron.less";
@import "twitter/bootstrap/thumbnails.less";
@import "twitter/bootstrap/alerts.less";
@import "twitter/bootstrap/progress-bars.less";
@import "twitter/bootstrap/media.less";
@import "twitter/bootstrap/list-group.less";
@import "twitter/bootstrap/panels.less";
@import "twitter/bootstrap/responsive-embed.less";
@import "twitter/bootstrap/wells.less";
@import "twitter/bootstrap/close.less";

// Components w/ JavaScript
@import "twitter/bootstrap/modals.less";
@import "twitter/bootstrap/tooltip.less";
@import "twitter/bootstrap/popovers.less";
@import "twitter/bootstrap/carousel.less";

// Utility classes
@import "twitter/bootstrap/utilities.less";
@import "twitter/bootstrap/responsive-utilities.less";

If you'd like to alter Bootstrap's own variables, or define your LESS styles inheriting Bootstrap's mixins, you can do so inside bootstrap_and_overrides.css.less:

@link-color: #ff0000;

SASS

If you are using SASS to compile your application.css (e.g. your manifest file is application.css.sass or application.css.scss) you may get this:

Invalid CSS after "*": expected "{", was "= require twitt..."
(in app/assets/stylesheets/application.css)
(sass)

If this is the case, you must use @import instead of *= in your manifest file, or don't compile your manifest with SASS.

Icons

By default, this gem (when using less generator) won't enable standard Bootstraps's Glyphicons.

If you would like to restore the default Glyphicons, inside the generated bootstrap_and_overrides.css.less uncomment these lines:

// Glyphicons are not required by default, uncomment the following lines to enable them.
@glyphiconsEotPath: font-url("glyphicons-halflings-regular.eot");
@glyphiconsEotPath_iefix: font-url("glyphicons-halflings-regular.eot?#iefix");
@glyphiconsWoffPath: font-url("glyphicons-halflings-regular.woff");
@glyphiconsTtfPath: font-url("glyphicons-halflings-regular.ttf");
@glyphiconsSvgPath: font-url("glyphicons-halflings-regular.svg#glyphicons_halflingsregular");

@import "twitter/bootstrap/glyphicons.less";

This gem was used to bundle the excellent Font-Awesome library. However that was another maintenance effort that is not worth to do here.

For Rails projects that need it there is the font-awesome-rails gem that provides same functionality that this gems was used to provide and it also have some other interesting features (e.g. view helpers).

Using JavaScript

Require Bootstrap JS (bootstrap.js) in your application.js

//= require twitter/bootstrap

$(function(){
  /* Your JavaScript goes here... */
});

If you want to customize what is loaded, your application.js would look something like this

#= require jquery
#= require jquery_ujs
#= require twitter/bootstrap/transition
#= require twitter/bootstrap/alert
#= require twitter/bootstrap/modal
#= require twitter/bootstrap/button
#= require twitter/bootstrap/collapse

...and so on for each bootstrap js component.

Using CoffeeScript (optionally)

Using Bootstrap with the CoffeeScript is easy. twitter-bootstrap-rails generates a "bootstrap.js.coffee" file for you to /app/assets/javascripts/ folder.

jQuery ->
  $("a[rel~=popover], .has-popover").popover()
  $("a[rel~=tooltip], .has-tooltip").tooltip()

Using Helpers

Modal Helper

You can create modals easily using the following example. The header, body, and footer all accept content_tag or plain html. The href of the button to launch the modal must match the id of the modal dialog. It also accepts a block for the header, body, and footer. If you are getting a complaint about the modal_helper unable to merge a hash it is due to this.

<%= content_tag :a, "Modal", href: "#modal", class: 'btn', data: {toggle: 'modal'} %>

<%= modal_dialog id: "modal",
         header: { show_close: true, dismiss: 'modal', title: 'Modal header' },
         body:   { content: 'This is the body' },
         footer: { content: content_tag(:button, 'Save', class: 'btn') } %>

Navbar Helper

It should let you write things like:

<%= nav_bar fixed: :top, brand: "Fashionable Clicheizr 2.0", responsive: true do %>
    <%= menu_group do %>
        <%= menu_item "Home", root_path %>
        <%= menu_divider %>
        <%= drop_down "Products" do %>
            <%= menu_item "Things you can't afford", expensive_products_path %>
            <%= menu_item "Things that won't suit you anyway", harem_pants_path %>
            <%= menu_item "Things you're not even cool enough to buy anyway", hipster_products_path %>
            <% if current_user.lives_in_hackney? %>
                <%= menu_item "Bikes", fixed_wheel_bikes_path %>
            <% end %>
        <% end %>
        <%= menu_item "About Us", about_us_path %>
        <%= menu_item "Contact", contact_path %>
    <% end %>
    <%= menu_group pull: :right do %>
        <% if current_user %>
            <%= menu_item "Log Out", log_out_path %>
        <% else %>
            <%= form_for @user, url: session_path(:user), html => {class: "navbar-form pull-right"} do |f| -%>
              <p><%= f.text_field :email %></p>
              <p><%= f.password_field :password %></p>
              <p><%= f.submit "Sign in" %></p>
            <% end -%>
        <% end %>
    <% end %>
<% end %>

Navbar scaffolding

In your view file (most likely application.html.erb) to get a basic navbar set up you need to do this:

<%= nav_bar %>

Which will render:

<div class="navbar">
  <div class="container">
  </div>
</div>

Fixed navbar

If you want the navbar to stick to the top of the screen, pass in the option like this:

<%= nav_bar fixed: :top  %>

To render:

<div class="navbar navbar-fixed-top">
  <div class="container">
  </div>
</div>

Static navbar

If you want a full-width navbar that scrolls away with the page, pass in the option like this:

<%= nav_bar static: :top  %>

To render:

<div class="navbar navbar-static-top">
  <div class="container">
  </div>
</div>

Brand name

Add the name of your site on the left hand edge of the navbar. By default, it will link to root_url. Passing a brand_link option will set the url to whatever you want.

<%= nav_bar brand: "We're sooo web 2.0alizr", brand_link: account_dashboard_path  %>

Which will render:

<div class="navbar">
  <div class="container">
      <a class="navbar-brand" href="/accounts/dashboard">
        We're sooo web 2.0alizr
      </a>
  </div>
</div>

Optional responsive variation

If you want the responsive version of the navbar to work (One that shrinks down on mobile devices etc.), you need to pass this option:

<%= nav_bar responsive: true %>

Which renders the html quite differently:

<div class="navbar">
  <div class="container">
    <!-- .navbar-toggle is used as the toggle for collapsed navbar content -->
    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </button>
    <!-- Everything in here gets hidden at 940px or less -->
    <div class="navbar-collapse collapse">
      <!-- menu items gets rendered here instead -->
    </div>
  </div>
</div>

Nav links

This is the 'meat' of the code where you define your menu items.

You can group menu items in theoretical boxes which you can apply logic to - e.g. show different collections for logged in users/logged out users, or simply right align a group.

The active menu item will be inferred from the link for now.

The important methods here are menu_group and menu_item.

menu_group only takes one argument - :pull - this moves the group left or right when passed :left or :right.

menu_item generates a link wrapped in an li tag. It takes two arguments and an options hash. The first argument is the name (the text that will appear in the menu), and the path (which defaults to "#" if left blank). The rest of the options are passed straight through to the link_to helper, so that you can add classes, ids, methods or data tags etc.

<%= nav_bar fixed: :top, brand: "Ninety Ten" do %>
    <%= menu_group do %>
        <%= menu_item "Home", root_path %>
        <%= menu_item "About Us", about_us_path %>
        <%= menu_item "Contact", contact_path %>
    <% end %>
    <% if current_user %>
        <%= menu_item "Log Out", log_out_path %>
    <% else %>
        <%= menu_group pull: :right do %>
            <%= menu_item "Sign Up", registration_path %>
            <%= form_for @user, url: session_path(:user) do |f| -%>
              <p><%= f.text_field :email %></p>
              <p><%= f.password_field :password %></p>
              <p><%= f.submit "Sign in" %></p>
            <% end -%>
        <% end %>
    <% end %>
<% end %>

Dropdown menus

For multi-level list options, where it makes logical sense to group menu items, or simply to save space if you have a lot of pages, you can group menu items into drop down lists like this:

<%= nav_bar do %>
    <%= menu_item "Home", root_path %>

    <%= drop_down "Products" do %>
        <%= menu_item "Latest", latest_products_path %>
        <%= menu_item "Top Sellers", popular_products_path %>
        <%= drop_down_divider %>
        <%= menu_item "Discount Items", discounted_products_path %>
    <% end %>

    <%= menu_item "About Us", about_us_path %>
    <%= menu_item "Contact", contact_path %>
<% end %>

Dividers

Dividers are just vertical bars that visually separate logically disparate groups of menu items

<%= nav_bar fixed: :bottom do %>
    <%= menu_item "Home", root_path %>
    <%= menu_item "About Us", about_us_path %>
    <%= menu_item "Contact", contact_path %>

    <%= menu_divider %>

    <%= menu_item "Edit Profile", edit_user_path(current_user) %>
    <%= menu_item "Account Settings", edit_user_account_path(current_user, @account) %>
    <%= menu_item "Log Out", log_out_path %>
<% end %>

Forms in navbar

At the moment - this is just a how to...

You need to add this class to the form itself (Different form builders do this in different ways - please check out the relevant docs)

.navbar-form

To pull the form left or right, add either of these classes:

.pull-left
.pull-right

If you want the Bootstrap search box (I think it just rounds the corners), use:

.navbar-search

Instead of:

.navbar-form

To change the size of the form fields, use .span2 (or however many span widths you want) to the input itself.

Component alignment

You can shift things to the left or the right across the nav bar. It's easiest to do this on grouped menu items:

<%= nav_bar fixed: :bottom do %>
    <% menu_group do %>
        <%= menu_item "Home", root_path %>
        <%= menu_item "About Us", about_us_path %>
        <%= menu_item "Contact", contact_path %>
    <% end %>
    <% menu_group pull: :right do %>
        <%= menu_item "Edit Profile", edit_user_path(current_user) %>
        <%= menu_item "Account Settings", edit_user_account_path(current_user, @account) %>
        <%= menu_item "Log Out", log_out_path %>
    <% end %>
<% end %>

Text in the navbar

If you want to put regular plain text in the navbar anywhere, you do it like this:

<%= nav_bar brand: "Apple" do %>
    <%= menu_text "We make shiny things" %>
    <%= menu_item "Home", root_path %>
    <%= menu_item "About Us", about_us_path %>
<% end %>

It also takes the :pull option to drag it to the left or right.

Flash helper

Add flash helper <%= bootstrap_flash %> to your layout (built-in with layout generator). You can pass the attributes you want to add to the main div returned: <%= bootstrap_flash(class: "extra-class", id: "your-id") %>

Breadcrumbs Helpers

Notice If your application is using breadcrumbs-on-rails you will have a namespace collision with the add_breadcrumb method. For this reason if breadcrumbs-on-rails is detected in Gemfile gem methods will be accessible using boostrap prefix, i.e. render_bootstrap_breadcrumbs and add_bootstrap_breadcrumb

Usually you do not need to use these breadcrumb gems since this gem provides the same functionality out of the box without the additional dependency.

However if there are some breadcrumbs-on-rails features you need to keep you can still use them and use this gem with the prefixes explained above.

Add breadcrumbs helper <%= render_breadcrumbs %> to your layout. You can also specify a divider for it like this: <%= render_breadcrumbs('>') %> (default divider is /). If you do not need dividers at all you can use nil: <%= render_breadcrumbs(nil) %>.

Full example:

render_breadcrumbs(" / ", { class: '', item_class: '', divider_class: '', active_class: 'active' })
class ApplicationController
  add_breadcrumb :root # 'root_path' will be used as url
end
class ExamplesController < ApplicationController
  add_breadcrumb :index, :examples_path

  def edit
    @example = Example.find params[:id]
    add_breadcrumb @example # @example.to_s as name, example_path(@example) as url
    add_breadcrumb :edit, edit_example_path(@example)
  end
end

All symbolic names translated with I18n. See I18n Internationalization Support section.

Element utility helpers

Badge:

<%= badge(12, :warning) %> <span class="badge badge-warning">12</span>

Label:

<%= tag_label('Gut!', :success) %> <span class="label label-success">Gut!</span>

Glyph:

<%= glyph(:pencil) %> <i class="icon-pencil"></i>

<%= glyph(:pencil, {tag: :span}) %> <span class="icon-pencil"></span>

<%= glyph(:pencil, {class: 'foo'}) %> <i class="icon-pencil foo"></i>

I18n Internationalization Support

The installer creates an English translation file for you and copies it to config/locales/en.bootstrap.yml

NOTE: If you are using Devise in your project, you must have a devise locale file for handling flash messages, even if those messages are blank. See https://github.com/plataformatec/devise/wiki/I18n

Changelog

Please see CHANGELOG.md for more details

Contributors & Patches & Forks

Please see CONTRIBUTERS.md for contributors list

About Me

Senior Software Developer Istanbul / Turkey seyhunak [at] gmail com

Hire Me

Hire Me !

Thanks

Bootstrap and all twitter-bootstrap-rails contributors http://twbs.github.io/bootstrap

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

License

Copyright (c) 2017 (since 2012) by Seyhun Akyรผrek

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

twitter-bootstrap-rails's People

Contributors

achempion avatar alepee avatar benlovell avatar cjoudrey avatar codeodor avatar datl avatar erbmicha avatar fabn avatar glanotte avatar gzigzigzeo avatar ji avatar leonid-shevtsov avatar lucasefe avatar mmichaa avatar nick-desteffen avatar nickmerwin avatar oliverletterer avatar panmari avatar seyhunak avatar sprachprofi avatar tagliala avatar tdm00 avatar toadkicker avatar tvw avatar twiz718 avatar victorsosa avatar westonplatter avatar yourabi avatar zencocoon avatar znz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

twitter-bootstrap-rails's Issues

The 0.0.4 Gem Is Empty

Perhaps an issue with your gem build, not sure as your gem spec looks fine. But this is what I see after installing the gem. In the meantime, I will bundle up to the repo.

 โˆด tree /Users/kencollins/Repositories/homemarks_app/vendor/ruby/1.9.1/gems/twitter-bootstrap-rails-0.0.4 
/Users/kencollins/Repositories/homemarks_app/vendor/ruby/1.9.1/gems/twitter-bootstrap-rails-0.0.4
โ”œโ”€โ”€ Gemfile
โ”œโ”€โ”€ Rakefile
โ”œโ”€โ”€ lib
โ”‚ย ย  โ”œโ”€โ”€ twitter-bootstrap-rails
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ version.rb
โ”‚ย ย  โ””โ”€โ”€ twitter-bootstrap-rails.rb
โ””โ”€โ”€ twitter-bootstrap-rails.gemspec

Empty gem?

I just installed the gem and I can't find the Twitter Bootstrap files anywhere in my application folder. Should they be in the /vendor/ folder?

I tried both the 'normal' way and with specifying the github repo.

Any ideas? thanks

`gem less` on Gemfile

Hi there,

README file sais that gem less and gem less-rails should be added in order to use LESS with twitter-bootstrap-rails.

After installing twitter-bootstrap-rails without adding less and less-rails to the Gemfile, those gems are installed after bundle install, so I guess there is no need to add it to Gemfile because they are dependencies of twitter-boostrap-rails.

Should the README file be updated to reflect this? Or there is a real necessity on referencing explicitly this gems on the Gemfile?

Error generating fluid layout

I'm trying to generate a fluid layout
rails g bootstrap:layout admin fluid

I get this error:

(erb):71:in template': undefined local variable or methodflash' for #Bootstrap::Generators::LayoutGenerator:0x007f9e65c9bb38 (NameError)

Error generation layout

Hi, there are problem with generating fluid and fixed layouts

$ rails g bootstrap:layout application fluid
/Users/alec/.rvm/gems/ruby-1.9.3-p0/bundler/gems/twitter-bootstrap-rails-61315ee040a8/lib/generators/bootstrap/layout/layout_generator.rb:15:in add_helper': undefined methodroot' for Bootstrap::Rails:Module (NoMethodError)
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/task.rb:22:in run' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:118:ininvoke_task'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in block in invoke_all' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:ineach'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in map' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:ininvoke_all'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/group.rb:226:in dispatch' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/base.rb:389:instart'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/generators.rb:170:in invoke' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/commands/generate.rb:12:in<top (required)>'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in require' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:inblock in require'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in load_dependency' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:inrequire'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/commands.rb:29:in `<top (required)>'

Missing 2.0 icons

Trying to use the new icons in bootstrap 2.0

<i class="icon envelope"></i>

Icon doesn't show up. Net inspector shows 404 when browser calls:

http://localhost:3000/assets/twitter/docs/assets/img/glyphicons-halflings-sprite.png

Generators fail to execute

gemfile

gem 'pg'
gem 'twitter-bootstrap-rails'
gem 'devise'

group :assets do
gem 'sass-rails', " > 3.1.0"
gem 'coffee-rails', "
> 3.1.0"
gem 'uglifier'
end

ran bundle install

running rails g generates an error
gems/twitter-bootstrap-rails-0.0.4/lib/twitter-bootstrap-rails.rb:7:in `require': no such file to load -- twitter-bootstrap-rails/engine (LoadError)

variables and mixins are called twice

In the generated less file, we are importing twitter/bootstrap and twitter/bootstrap/responsive both brings in variables and mixins modules. That results in element attribute styling repetitions like so:

a:focus {
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}

Edit resource form broken Rails 3.1.3

Bootstrapped works fine, looks great, except when I edit a resource it creates a new record instead?

I generated a model page and views with bootstrapped:
rails g bootstrap:install
rails g scaffold page title:string permalink:string content:text
rails g bootstrap:themed pages

edit.html.erb:
<%= bootstrap_form_for :page, :url => pages_path, :html => { :class => :form } do |f| -%>
<%= render :partial => "form", :locals => {:f => f} %>
<% end -%>

new.html.erb:
<%= bootstrap_form_for :page, :url => pages_path, :html => { :class => :form } do |f| -%>
<%= render :partial => "form", :locals => {:f => f} %>
<% end -%>

When I click on edit in index page, I get a filled in form for this record, when clicking save it makes a copy and I get a new record instead of it updating the original.

Here is my log when I click on edit:
Started GET "/pages/7/edit" for 127.0.0.1 at 2012-01-18 11:48:10 +0100
Processing by PagesController#edit as HTML
Parameters: {"id"=>"7"}
Page Load (0.4ms) SELECT pages.* FROM pages WHERE pages.id = 7 LIMIT 1
Rendered pages/_form.html.erb (7.9ms)
Rendered pages/edit.html.erb within layouts/application (12.5ms)
Completed 200 OK in 35ms (Views: 31.4ms | ActiveRecord: 1.5ms)

Now when I click on save button on this edit page it calls the create instead of update method on my controller:

Started POST "/pages" for 127.0.0.1 at 2012-01-18 11:48:57 +0100
Processing by PagesController#create as HTML
Parameters: {"utf8"=>"โœ“", "authenticity_token"=>"nrS9vW24ogvlHEWdRT28QIuWfr9u1JG4qotZEqxL/Zg=", "page"=>{"title"=>"hello world2", "permalink"=>"hello", "content"=>"blabla"}}
(0.2ms) BEGIN
SQL (0.4ms) INSERT INTO pages (content, created_at, permalink, title, updated_at) VALUES ('blabla', '2012-01-18 10:48:57', 'hello', 'hello world2', '2012-01-18 10:48:57')
(0.6ms) COMMIT
Redirected to http://localhost:3000/pages/8
Completed 302 Found in 13ms

Started GET "/pages/8" for 127.0.0.1 at 2012-01-18 11:48:57 +0100
Processing by PagesController#show as HTML
Parameters: {"id"=>"8"}
Page Load (0.3ms) SELECT pages.* FROM pages WHERE pages.id = 8 LIMIT 1
Rendered pages/show.html.erb within layouts/application (6.1ms)
Completed 200 OK in 78ms (Views: 74.6ms | ActiveRecord: 1.3ms)

class BootstrapFormBuilder < ActionView::Helpers::FormBuilder
helpers = field_helpers +
%w{date_select datetime_select time_select} +
%w{collection_select select country_select time_zone_select} -
%w{hidden_field label fields_for}

helpers.each do |name|
define_method(name) do |field, *args|
options_index = ActionView::Helpers::FormBuilder.instance_method(name.to_sym).parameters.index([:opt,:options])
if options_index.nil?
options = args.last.is_a?(Hash) ? args.pop : {}
else
options = args[options_index - 1]
end
label = label(field, options[:label], :class => options[:label_class])
@template.content_tag(:div, :class => 'clearfix') do
@template.concat(label)
@template.concat(@template.content_tag(:div, :class => 'input') { @template.concat(super(field, *args)) })
end
end
end
end

ActionView::Base.default_form_builder = BootstrapFormBuilder

issue with .disabled class name and "disabled='disabled'" attribute

originally opened it against slim, https://github.com/stonean/slim/issues/211

using twitter-bootstrap-rails 1.4.1 and rails 3.1.1 issue was caused by the last 2 lines in auto-generated app/assets/javascripts/bootstrap.js.coffee

$ ->
 $(".btn").button "complete"

should be easy to reproduce. create new rails app and add twitter-bootstrap-rails to Gemfile (bundle install etc.). run rails g bootstrap:install and create a basic view with

Foo

in my case the button is not disabled. let me know if more info is needed.

Don't version asset files

Personally I don't like the asset files having the version included. This kind of defeats the purpose of using a gem in the first place over manually vendoring the files if you still need to modify your application.css. My suggestion would be to version the gem the same as the bootstrap framework, and if you desire use bundler to lock the version.

Problems with therubyracer

I'm having problems getting therubyracer to install, which of course is a problem with therubyracer or my machine, but I'm wondering why it's a necessary dependency? It wasn't previously. Also, I notice you truncated the commit history or something, so I can't pin to a previous version :(

Layout generator is out of date

The names of CSS classes were changed in the 2.0 version of Bootstrap. Please update the generators accordingly, as of now everything looks screwed.

uninitialized constant Bootstrap::Rails::Generators

I am using rails 3.2.1 and I am seeing this error when I try to run rails g bootstrap:install

> rails g bootstrap:install
[WARNING] Could not load generator "generators/bootstrap/install/install_generator". Error: uninitialized constant Bootstrap::Rails::Generators.
/home/sean/.rvm/gems/ruby-1.9.3-p0@closelocal/bundler/gems/twitter-bootstrap-rails-02bdece177eb/lib/generators/bootstrap/install/install_generator.rb:5:in `<module:Generators>'
/home/sean/.rvm/gems/ruby-1.9.3-p0@closelocal/bundler/gems/twitter-bootstrap-rails-02bdece177eb/lib/generators/bootstrap/install/install_generator.rb:4:in `<module:Bootstrap>'
/home/sean/.rvm/gems/ruby-1.9.3-p0@closelocal/bundler/gems/twitter-bootstrap-rails-02bdece177eb/lib/generators/bootstrap/install/install_generator.rb:3:in `<top (required)>'
/home/sean/.rvm/gems/ruby-1.9.3-p0@closelocal/gems/railties-3.2.1/lib/rails/generators.rb:298:in `block (2 levels) in lookup'
/home/sean/.rvm/gems/ruby-1.9.3-p0@closelocal/gems/railties-3.2.1/lib/rails/generators.rb:294:in `each'
/home/sean/.rvm/gems/ruby-1.9.3-p0@closelocal/gems/railties-3.2.1/lib/rails/generators.rb:294:in `block in lookup'
/home/sean/.rvm/gems/ruby-1.9.3-p0@closelocal/gems/railties-3.2.1/lib/rails/generators.rb:293:in `each'
/home/sean/.rvm/gems/ruby-1.9.3-p0@closelocal/gems/railties-3.2.1/lib/rails/generators.rb:293:in `lookup'
/home/sean/.rvm/gems/ruby-1.9.3-p0@closelocal/gems/railties-3.2.1/lib/rails/generators.rb:151:in `find_by_namespace'
/home/sean/.rvm/gems/ruby-1.9.3-p0@closelocal/gems/railties-3.2.1/lib/rails/generators.rb:168:in `invoke'
/home/sean/.rvm/gems/ruby-1.9.3-p0@closelocal/gems/railties-3.2.1/lib/rails/commands/generate.rb:12:in `<top (required)>'
/home/sean/.rvm/gems/ruby-1.9.3-p0@closelocal/gems/railties-3.2.1/lib/rails/commands.rb:29:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
Could not find generator bootstrap:install.

I saw a previous error that was very similar, but that bug had been closed due to rails 3.2 support.

Cannot call method 'charAt' of undefined

Just updated my bundle to have bootstrap 2.0 and now i got an error when running "rake assets:precompile":

rake aborted!
Cannot call method 'charAt' of undefined
  (in /home/codular/.rvm/gems/ruby-1.9.3-p0/bundler/gems/twitter-bootstrap-rails-bda879201e63/vendor/assets/stylesheets/twitter/bootstrap.css.less)

Tasks: TOP => assets:precompile

Any ideas to resolve it ?

bootstrap:layout generator ERROR

bin/rails g bootstrap:layout application fixed
[WARNING] Could not load generator "generators/bootstrap/layout/layout_generator". Error: uninitialized constant Bootstrap::Rails::Generators.

no navbar.less

bootstrap.less
mixins.less
reset.less
tables.less
variables.less
forms.less
patterns.less
scaffolding.less
type.less

there is no navbar.less that I need in twitter-bootstrap-rails-1.4.3/vendor/toolkit/twitter/bootstrap

Bootstrap Form Builder

I wrote a bootstrap_form_for builder that outputs HTML for use with Bootstrap 2.0's .form-horizontal or .form-vertical styles.

https://gist.github.com/1695087

It follows Bootstrap's convention of adding the .error class to the .control-group fieldset and overrides Rail's default error wrapping behavior. It does not conflict with ActionView::Base.field_error_proc so non-bootstrap forms function normally.

This gem seems like a good home for a bootstrap form builder so I thought I would share what I have if you wish to use it as a starting point. It obviously is very basic and needs refinement but it gets the job done.

<%= bootstrap_form_for @user, html: {class: 'form-horizontal'} do |f| %>
  <legend>Create an Account</legend>

  <%= f.control_group :email do %>
    <%= f.email_field :email %>
  <% end %>

  <%= f.control_group :password do %>
    <%= f.text_field :password %>
    <p class="help-block">Must be at least 6 characters</p>
  <% end %>

  <%= f.control_group :full_name do %>
    <%= f.text_field :full_name %>
  <% end %>

  <%= field_set_tag nil, class: 'form-actions' do %>
    <%= button_tag 'Create account', type: 'submit', class: 'btn primary' %>
    <%= link_to 'Cancel', root_path %>
  <% end %>
<% end %>

Scaffolding still at 16-column grid

Bootstrap 2.0 says that the new grid is 12 columns, but in practice I'm finding that this gem is still supporting the 16 column grid from the older version. Curious what's up with that - intentional?

Less variables

I am using master branch version and i am trying to override some less variables in the bootstrap.css.less but it is not working.

@import "twitter/bootstrap";

// Baseline grid
@basefont: 20px;
@baseline: 18px;
@gridColumns: 24;
@gridGutterWidth: 20px;
@gridColumnWidth: 21px;
@primaryButtonBackground: white;

Uncaught TypeError: Cannot read property 'Twipsy' of undefined

Got this error when the end of my app/assets/application.js looked like this (as suggested in the readme)

//= require bootstrap-alerts-1.3.0
//= require bootstrap-dropdown-1.3.0
//= require bootstrap-modal-1.3.0
//= require bootstrap-popover-1.3.0
//= require bootstrap-scrollspy-1.3.0
//= require bootstrap-tabs-1.3.0
//= require bootstrap-twipsy-1.3.0

Moving the twipsy line to before the popover line solved this problem (popover depends on twipsy)

//= require bootstrap-alerts-1.3.0
//= require bootstrap-dropdown-1.3.0
//= require bootstrap-modal-1.3.0
//= require bootstrap-twipsy-1.3.0
//= require bootstrap-popover-1.3.0
//= require bootstrap-scrollspy-1.3.0
//= require bootstrap-tabs-1.3.0

Double checking mongoid support

I saw that this was pattern similarly to web_app_theme and was wondering it fully supported mongoid, because the
columns method in themed_generator.rb, suggest there is support for it but template files like templates / show.html.erb, makes me feel unsure, so i said i should clarify here for myself and for others since it isn't mentioned in the documentation.

Could not load generator

[WARNING] Could not load generator "generators/bootstrap/install/install_generator". Error: uninitialized constant Bootstrap::Rails::Generators.
/Users/user/.rvm/gems/ruby-1.9.2-p180/bundler/gems/twitter-bootstrap-rails-b747bae72b55/lib/generators/bootstrap/install/install_generator.rb:5:in `module:Generators'

Use New Less::Rails Railtie

When learning LESS I wanted to do two things.

  1. Use twitter's compiled bootstrap CSS in the asset pipeline.
  2. Use twitter bootstrap's .less files so I can build my own CSS on top of their LESS mixing.

Item is solved by this gem, but not number too using this syntax

@import "bootstrap";

#foo {
  .border-radius(4px);
}

So after reading this issue (http://github.com/cowboyd/less.rb/issues/8) on the less.rb project, I decided to make the Less::Rails gem (http://github.com/metaskills/less-rails). Hopefully soon I can publish this gem to the abandoned rubygems.org/gems/less-rails space.

I am proposing that your railtie hook into this new standard config.less.load_paths so others can avoid using the hack described on my read me.

is less necessary? doesn't install into jruby

Currently this project cannot be installed into JRuby due to {{less}}, which depends on {{therubyracer}} which cannot install into JRuby.

Is there an alternate dependency that supports JRuby?

Alternately, perhaps document that JRuby isn't supported?

Thanks!

Problems precompiling assets

Hi there.

I'm having problems precompiling my assets with twitter-bootstrap-rails.

Russetl pml$ rake assets:precompile
/Users/pml/.rvm/rubies/ruby-1.9.2-p136/bin/ruby /Users/pml/.rvm/gems/ruby-1.9.2-p136/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
file 'reset.less' wasn't found.

  (in /Users/pml/.rvm/gems/ruby-1.9.2-p136/bundler/gems/twitter-bootstrap-rails-8d2ffc94bd64/vendor/assets/stylesheets/bootstrap/bootstrap.less)

Tasks: TOP => assets:precompile:primary

Has anyone encountered this before, and is there a workaround? I will try to investigate it in more detail, but I'm really strapped for time at the moment :/

Paul

undefined method `parameters'

I've followed your instructions, it seems that it works, but when I try to create a new resource (action "new"), I've got this error

undefined method `parameters' for #UnboundMethod: ActionView::Helpers::FormBuilder#text_field

This is the line where something doesn't works properly

 f.text_field :name, :class => :text_field 

I'm using rails 3.1.1and your gem from this repo

confused

Hi,

can you let me know how different is this by adding the css and JS files from Bootstrap itself??

Thx

Is the installed app/assets/javascripts/bootstrap.js.coffee necessary ?

I think the installed app/assets/javascripts/bootstrap.js.coffee ends up mostly doing nothing if you follow bootstrap's documentation when setting up the widgets.

For example:

  $ ->
    $(".alert").alert()

Is roughly duplicate functionality of this chunk in /assets/twitter/bootstrap/bootstrap-alert.js:

  $(function () {
    $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
  })

and:

  $ ->
    $(".dropdown-toggle").dropdown()

is roughly duplicate functionality of this chunk in /assets/twitter/bootstrap/bootstrap-dropdown.js:

  $(function () {
    $('html').on('click.dropdown.data-api', clearMenus)
    $('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
  })

Themed scaffolding forms have duplicate labels

Looking at lib/generators/bootstrap/themed/builders/builder.rb it looks like you create a label for every form helper automatically and you also set the default form builder to be BootstrapForm builder.

Either this should be removed so that you are able to use forms in your application or the application helper bootstrap_form_for should be removed.

The _form.html.erb scaffold should also not include a label element in either case.

I'm running rails 3.2 if that helps.

Wrong image path

The icon path in css is ../img/glyphicons-halflings.png, but it's not exist.
It should be http://lvh.me:3000/assets/glyphicons-halflings.png

Error on rails g bootstrap:install

When I run rails g bootstrap:install I get the following error:

Rails 3.1.3
Ruby 1.9.3

ruby-1.9.3-p0 > rails g bootstrap:install
/Users/ryanresella/.rvm/gems/ruby-1.9.3-p0/gems/twitter-bootstrap-rails-1.4.1/lib/generators/bootstrap/install/install_generator.rb:5:in <module:Generators>': uninitialized constant Bootstrap::Rails::Generators (NameError) from /Users/ryanresella/.rvm/gems/ruby-1.9.3-p0/gems/twitter-bootstrap-rails-1.4.1/lib/generators/bootstrap/install/install_generator.rb:4:inmodule:Bootstrap'
from /Users/ryanresella/.rvm/gems/ruby-1.9.3-p0/gems/twitter-bootstrap-rails-1.4.1/lib/generators/bootstrap/install/install_generator.rb:3:in <top (required)>' from /Users/ryanresella/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/generators.rb:297:inblock (2 levels) in lookup'
from /Users/ryanresella/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/generators.rb:293:in each' from /Users/ryanresella/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/generators.rb:293:inblock in lookup'
from /Users/ryanresella/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/generators.rb:292:in each' from /Users/ryanresella/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/generators.rb:292:inlookup'
from /Users/ryanresella/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/generators.rb:149:in find_by_namespace' from /Users/ryanresella/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/generators.rb:166:ininvoke'
from /Users/ryanresella/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/commands/generate.rb:12:in <top (required)>' from /Users/ryanresella/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/commands.rb:28:in<top (required)>'
from script/rails:6:in require' from script/rails:6:in

'

V8::JSError

I'm following instruction in README and I got error

V8::JSError
(in /usr/lib/ruby/gems/1.8/gems/twitter-bootstrap-rails-1.4.3/vendor/assets/stylesheets/twitter/bootstrap.css.less)

Rails 3.2.0.rc2

HAML Support

I couldn't get this gem to generate HAML Views and work with a HAML Layout. Is this available in some form?

Incompatible version for gem "jquery-rails" with rails 3.2.0.rc1

Using rails 3.2.0.rc1 twitter-bootstrap-rails installation returns the following error:

Bundler could not find compatible versions for gem "jquery-rails":
  In Gemfile:
    twitter-bootstrap-rails (>= 0) ruby depends on
      jquery-rails (~> 1.0) ruby

    jquery-rails (2.0.0)

are you overriding the form helpers?

Hi,

I dont understand use of this gem? are you overriding the form helpers like text_field_tag etc?? It seems you are not.. You are giving me the only assets with this project? correct me if I am wrong..

Thx

'reset.css.less' wasn't found.

Hey guys,

I run rails g bootstrap:install
added *= require twitter/bootstrap to application.css and get this error

'reset.css.less' wasn't found.

(in project/vendor/assets/stylesheets/twitter/bootstrap.css.less)

Generator freaks out when you don't have an application.css

      insert  app/assets/javascripts/application.js
      insert  app/assets/stylesheets/application.css
/Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/actions/inject_into_file.rb:99:in `binread': No such file or directory - /Users/aaron/Sites/jobschneider/app/app/assets/stylesheets/application.css (Errno::ENOENT)
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/actions/inject_into_file.rb:99:in `replace!'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/actions/inject_into_file.rb:60:in `invoke!'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/actions.rb:95:in `action'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/actions/inject_into_file.rb:31:in `insert_into_file'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/bundler/gems/twitter-bootstrap-rails-4296bb9105ca/lib/generators/bootstrap/install/install_generator.rb:11:in `add_assets'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `block in invoke_all'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `each'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/generators.rb:168:in `invoke'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/commands/generate.rb:12:in `<top (required)>'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
    from /Users/aaron/Sites/jobschneider/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/commands.rb:28:in `<top (required)>'
    from script/rails:6:in `require'

I added a blank application.css to app/assets/stylesheets and it generated everything without errors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.