using twitter-bootstrap via rails engine.
We’re developing a Rails engine Message Broker which will do some awesome things. As User Interface proposed by me is rejected from the scratch (May be you know the person) hence we opted Twitter-Bootstrap for Engine User Interface for simplicity. following are the steps which need to be done to use Twitter-Bootstrap.
-
add following to your engine_name.gemspec
{% highlight ruby %}
s.add_dependency ‘bootstrap-sass’, ‘~> 3.2.0’
s.add_dependency ‘sass-rails’{% endhighlight %}
-
require bootstrap to lib/engine_name.rb
require 'bootstrap'
-
Rename application.css to application.css.sass and add following code
{% highlight ruby %} @import ‘bootstrap-sprockets’
@import ‘bootstrap’ {% endhighlight %} -
add
//= require bootstrap-sprockets
to your application.js after{% highlight ruby %} //= require jquery
//= require jquery_ujs {% endhighlight %} -
apply changes to your application layout and views
-
Restart Rails Server
And if you get stuck… Ask Here
email me rajeevsharma86@gmail.com