読者です 読者をやめる 読者になる 読者になる

zakihayaメモ

RubyとRailsのことが中心

Railsアプリを作る時の基本設定

自分用にメモ

Gemfile

source 'https://rubygems.org'

gem 'rails', '3.2.6'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'
gem 'mysql2'

gem 'haml-rails'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer'

  gem 'uglifier', '>= 1.0.3'
  gem "twitter-bootstrap-rails"
end

gem 'jquery-rails'

group :development, :test do
  gem 'rspec'
  gem 'rspec-rails'
  gem 'spork'
  gem 'guard-spork'
  gem 'growl'
  gem 'guard-rspec'
  gem 'fabrication'
  gem 'capybara'
  gem 'capybara-webkit'
  gem 'email_spec'
  gem 'faker'
  gem 'sunspot-rails-tester'
  gem 'cucumber-rails', :require => false
  gem 'guard-cucumber'
  gem 'awesome_print'
  gem 'pry-nav'
end

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

application.rb

module RailsApp
  class Application < Rails::Application
  ・
  ・
  ・
    config.time_zone = 'Tokyo'
    config.active_record.default_timezone = :local

    config.i18n.default_locale = 'ja'

    config.generators do |g|
      g.template_engine :haml
      g.test_framework :rspec
    end
  ・
  ・
  ・
  end
end
rails g rspec:install
rails g bootstrap:install
rails g bootstrap:layout application