rails new my_project -T --database=postgresql --skip-turbolinks --skip-spring
group :development, :test do
gem 'rspec-rails', '~> 3.5'
end
bundle install
rails generate rspec:install
gem 'orderly'
bundle
group :test do
gem 'shoulda-matchers', '~> 3.1'
end
bundle
// rails_helper.rb
Shoulda::Matchers.configure do |config|
config.integrate do |with|
with.test_framework :rspec
with.library :rails
end
end
# Example
RSpec.describe Person, type: :model do
it { should validate_presence_of(:name) }
end
gem 'capybara'
bundle
// rails_helper.rb
require 'capybara/rails'
# All development / test gems
group :development, :test do
gem 'rspec-rails', '~> 3.5'
gem 'capybara'
gem 'factory_girl_rails'
gem 'launchy'
gem 'database_cleaner'
gem 'faker
end
bundle
# Create directory and folder for factory girl:
mkdir spec/support
touch spec/support/factory_girl.rb
# Add Rspec configuration to factory_girl.rb:
RSpec.configure do |config|
config.include FactoryGirl::Syntax::Methods
config.before(:suite) do
begin
DatabaseCleaner.start
FactoryGirl.lint
ensure
DatabaseCleaner.clean
end
end
end
# Uncomment this line from rails_helper.rb
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
heroku create
git push heroku master
heroku run rake db:reset
heroku open
gem 'bootstrap-sass', '~> 3.2.0'
gem 'autoprefixer-rails'
# NOTE: The sass-rails gem is included with new Rails applications by default.
# gem 'sass-rails'
bundle
# change name of application.css to application.scss and remove everything from file
// app/assets/stylesheets/application.scss
...
@import "bootstrap-sprockets"
@import "bootstrap"
// app/assets/javascripts/application.js file.
# after //= require jquery
//= require bootstrap-sprockets
## So it looks like this
// app/assets/javascripts/application.js
...
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require bootstrap-sprockets
//= require_tree .
gem bootstrap_form
bundle
// app/assets/stylesheets/application.scss
@import "rails_bootstrap_forms";
[Color gradients] (http://uigradients.com/#)
gem "haml-rails", "~> 0.9"