Project

failuregem

0.0
No commit activity in last 3 years
No release in over 3 years
A simple Gem that includes everything you need to start right away with Rails programming! For the installation process, please check the documentation on github.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.2, >= 2.2.17
~> 3.16, >= 3.16
~> 13.0, >= 13.0.3

Runtime

~> 1.0, >= 1.0.5
~> 1.10, >= 1.10.4
~> 6.1, >= 6.1
~> 1.0, >= 1.0.2
~> 5.0, >= 4.6
~> 1.9, >= 1.9.0.1
~> 3.2, >= 3.2.1
~> 3.16, >= 3.16
~> 6.2, >= 6.2
~> 1.6.1, >= 1.6.1
~> 2.2, >= 2.2
~> 4.8, >= 4.8
~> 4.7, >= 4.7.0.7
~> 0.1.3, >= 0.1.3
~> 4.4, >= 4.4
~> 2.1, >= 2.1.1
~> 0.1, >= 0.1
~> 5.1, >= 5.1
 Project Readme

FAILURE-GEM

Failuregem aims to be a timesafer for railsapps. Why should you copy&paste all the usefull GEMs in your Gemfile every time you start a new App?! Failuregem Includes couple of usefull Gems to start rightaway with Rails programming:

  • Active_link_to
  • Bootstrap
  • Bootstrap Datepicker
  • CanCanCan
  • Capistrano
  • Capistrano Postgresql
  • Capistrano Rails
  • Capistrano Rbenv
  • Devise
  • Devise CAS Authenticatable
  • Font-Awesome-Rails
  • Jquery-Rails
  • Paperclip
  • Rails Admin
  • Rails Real Favicon
  • Simple Form
  • Will Paginate Bootstrap

Installation

Add it to your Gemfile:

gem 'failuregem'

Run the following command to install it:

bundle install

Install all GEMs

Run the following command to install & configure all included GEMs:

rails g simple_form:install --bootstrap
rails g devise:install
rails g devise User
rails g devise:views
rails g cancan:ability
rails g rails_admin:install

#Create Basic Configuration Files for Capistrano
bundle exec cap install

Import GEMs in application.scss

@import "bootstrap";
@import "font-awesome";
@import "bootstrap-datepicker3";

Import GEMs in application.js

//= require jquery3
//= require popper
//= require bootstrap
//= require bootstrap-datepicker/core
//= require bootstrap-datepicker/locales/bootstrap-datepicker.de.js

For using ActiveLinkTo please use the official documentation


Failuregem has the newest Bootstrap version included but you still have to import it to your application.scss To do that you have to rewrite application.css to application.scss

$ mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss
// Import Bootstrap in application.scss
@import "bootstrap";

Add Bootstrap dependencies and Bootstrap to your application.js:

//= require jquery3
//= require popper
//= require bootstrap-sprockets

While bootstrap-sprockets provides individual Bootstrap components for ease of debugging, you may alternatively require the concatenated bootstrap for faster compilation:

//= require jquery3
//= require popper
//= require bootstrap

Add this line to app/assets/stylesheets/application.css

 @import "bootstrap-datepicker3"

Add this line to app/assets/javascripts/application.js

//= require bootstrap-datepicker

The default includes support for all languages. You can fine tune the included locales to suit your needs:

//= require bootstrap-datepicker/core
//= require bootstrap-datepicker/locales/bootstrap-datepicker.es.js
//= require bootstrap-datepicker/locales/bootstrap-datepicker.fr.js

Using bootstrap-datepicker-rails

Just use the simple data-provide='datepicker' attribute.

<input type="text" data-provide='datepicker' >

Or call datepicker() with any selector.

<input type="text" class='datepicker' >

<script type="text/javascript">
  $(document).ready(function(){
    $('.datepicker').datepicker();
  });
</script>

To install CanCanCan you still have to load the installer

rails g cancan:ability

See Defining Abilities for details.


cap production deploy

When you run cap, Capistrano dutifully connects to your server(s) via SSH and executes the steps necessary to deploy your project. You can define those steps yourself by writing Rake tasks, or by using pre-built task libraries provided by the Capistrano community.

For more information please check the Documentation.


To install Devise you still have to load the installer

rails generate devise:install

In the following command you will replace MODEL with the class name used for the application’s users (it’s frequently User but could also be Admin). This will create a model (if one does not exist) and configure it with the default Devise modules. The generator also configures your config/routes.rb file to point to the Devise controller.

rails generate devise MODEL

Once devise_cas_authenticatable is installed, add the following to your user model:

devise :cas_authenticatable

To include the newest Font-Awesome you have to import to your application.scss

@import "font-awesome";

For using Paperclip please use the official documentation


To install RailsAdmin you still have to load the installer

rails g rails_admin:install

Provide a namespace for the routes when asked Start a server rails s and administer your data at /admin. (if you chose default namespace: /admin)


Go to RealFaviconGenerator for Ruby on Rails, submit your image and craft your icons.


Simple Form can be easily integrated to the Bootstrap. To do that you have to use the bootstrap option in the install generator, like this:

rails generate simple_form:install --bootstrap

No longer maintained

In the view, use the renderer: BootstrapPagination::Rails option with the will_paginate helper, for example:

<%= will_paginate @collection, renderer: BootstrapPagination::Rails %>

Now you good to go!