twitter-bootstrap-rails

ActionView::Template::Error (variable @fontAwesomeEotPath_iefix is undefined)

柔情痞子 提交于 2019-12-04 06:27:52
I get an error while trying to load any page: ActionView::Template::Error (variable @fontAwesomeEotPath_iefix is undefined) (in /app/assets/stylesheets/bootstrap_and_overrides.css.less)): 2: <html> 3: <head> 4: <title>Program</title> 5: <%= stylesheet_link_tag "application", :media => "all" %> 6: <%= javascript_include_tag "application" %> 7: <%= csrf_meta_tags %> 8: </head> app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb__242882506_70513990' app/controllers/problems_controller.rb:7:in `index' What I did before? Just run bundle update Because of bootstrap

Converting String to Date before save with Rails

左心房为你撑大大i 提交于 2019-12-04 02:48:36
Very new to Ruby and I've been stuck for hours. Searching everywhere and can't find an answer. So I'm using the bootstrap datepicker for rails gem. Because I've changed the date format of the datepicker, it won't store in the DB. Guessing this is because the simple_form input is being used as a string to avoid the default date selection inputs applied by simple_form. My question is: How do I modify/convert a string like "06/18/2013" to a date before it is saved to the db? Is this best handled by the controller? My controller: # PUT /events/1 # PUT /events/1.json def update @event = Event.find

How to embed font-awesome icons into submit_tag

妖精的绣舞 提交于 2019-12-03 10:00:24
Trying to user font awesome icons for my buttons but I cant get it to show in the submit_tag <%= submit_tag icon("search"), class: "btn-primary", style:"width:40px;" %> output: <input class="btn-primary" name="commit" style="width:40px;" type="submit" value="<i class='icon-search' style='font-size:1em' ></i>"> helper: def icon(name, size=1) #icon("camera-retro") #<i class="icon-camera-retro"></i> html = "<i class='icon-#{name}' " html += "style='font-size:#{size}em' " html += "></i>" html.html_safe end when I remove the html.html_safe line of the helper I get the same thing. its like html_safe

twitter-bootstrap-rails on Heroku: Glyphicons displayed as squares

回眸只為那壹抹淺笑 提交于 2019-12-02 21:27:37
I have deployed a rails app on Heroku, and I am using the twitter-bootstrap-rails gem to include twitter bootstrap. Everything works perfectly locally (and in the development environment), but on Heroku (and in production) everything works fine except for the glyphicons, which all display as little squares. At first I thought this was a problem with the icon sprites not being precompiled, so in my gemfile, I moved the line 'gem twitter-bootstrap-rails' out of the assets group, and I was sure to precompile all my assets before uploading to Heroku. However, this did not solve the problem. After

Twitter-bootstrap-rails: does it install Bootstrap into a project?

余生长醉 提交于 2019-12-02 18:03:02
问题 I do everything according to Readme but having an issue when starting a rails app: Sprockets::FileNotFound And it points to //= require twitter/bootstrap Does this gem really install bootstrap stylesheets and corresponding js libraries or one is supposed to install them manually (with bower or in another way)? Here is my Gemfile: # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.2.5.1' # Use postgresql as the database for Active Record gem 'pg', '~> 0.15' # Use

How to setup bootstrap-datepicker-rails?

大憨熊 提交于 2019-11-30 18:13:01
Anybody knows how to setup the gem bootstrap-datepicker-rails? I followed the steps in http://rubydoc.info/gems/bootstrap-datepicker-rails/0.6.21/frames , basically: I setup twitter-bootstrap-rails gem I add this to gemfile gem 'bootstrap-datepicker-rails', '>= 0.6.21' Add this line to app/assets/stylesheets/application.css *= require bootstrap-datepicker Add this line to app/assets/javascripts/application.js //= require bootstrap-datepicker Add this line to app/assets/javascripts/controllername.js.coffee $('.datepicker').datepicker() Finally use in view :) <input type="text" data-behaviour=

How to reuse a class in sass without using a mixin? [duplicate]

≯℡__Kan透↙ 提交于 2019-11-30 06:21:01
This question already has an answer here: Including another class in SCSS 5 answers I want all my anchors in my application look like .btn (Twitter Bootstrap class), is there a way to make this? I did a{ @include btn; } but it does not work because btn should be a mixin, and it's a Twitter Bootstrap class. You want to use @extend .btn; - @extend allows you to inherit all the properties of a selector without having to define it as a mixin. This is exactly what you want => https://github.com/thomas-mcdonald/bootstrap-sass Install the gem bootstrap-sass In config.rb => require 'bootstrap-sass'

Bootstrap Tooltip in Ruby on Rails

二次信任 提交于 2019-11-30 04:46:42
问题 I'm trying to get this done for quite some time now and i can't figure out whats wrong: My Link: <%= link_to '#', tag, class: "tag-tooltip", :data => {:toggle=>"tooltip"}, 'data-original-title' => "Hey Whats up", 'data-placement' => 'right'%> My Javascript: $('.tag-tooltip').tooltip(); But it's not working... What am i missing ? EDIT If i go into my Chrome Console and insert ( $('.tag-tooltip').tooltip(); ) it is working. So i guess the js file is not loading ? (I checked my application.js

How to setup bootstrap-datepicker-rails?

倖福魔咒の 提交于 2019-11-30 02:00:01
问题 Anybody knows how to setup the gem bootstrap-datepicker-rails? I followed the steps in http://rubydoc.info/gems/bootstrap-datepicker-rails/0.6.21/frames, basically: I setup twitter-bootstrap-rails gem I add this to gemfile gem 'bootstrap-datepicker-rails', '>= 0.6.21' Add this line to app/assets/stylesheets/application.css *= require bootstrap-datepicker Add this line to app/assets/javascripts/application.js //= require bootstrap-datepicker Add this line to app/assets/javascripts

How to reuse a class in sass without using a mixin? [duplicate]

三世轮回 提交于 2019-11-29 05:12:12
问题 This question already has an answer here: Including another class in SCSS 5 answers I want all my anchors in my application look like .btn (Twitter Bootstrap class), is there a way to make this? I did a{ @include btn; } but it does not work because btn should be a mixin, and it's a Twitter Bootstrap class. 回答1: You want to use @extend .btn; - @extend allows you to inherit all the properties of a selector without having to define it as a mixin. 回答2: This is exactly what you want => https:/