LoginSignup
0
0

More than 3 years have passed since last update.

chat-spaceを作ろう①

Last updated at Posted at 2020-02-25

アプリケーションを立ち上げる

ターミナル
rails new chat-space -d mysql
アプリ立ち上げ アプリ名 データベース指定
cd ~/ディレクトリを移動

rails db:create
データベース作成

事前準備

Hamlを導入する

gemfile
gem 'haml-rails'
ターミナル
bundle install
rails haml:erb2haml
拡張子.erbのファイルを,hamlになる

sassを準備する

app/assets/stylesheets/application.css
の中身を全て削除し、拡張子を.scssに変更

reset scssの設定(今回はYUI3を使用)

assets/stylesheetsディレクトリ内に部分テンプレート_reset.scssファイルを作成
その中にYUI3をコピペする

assets/stylesheets/application.scss
@import "./reset";
作成した_reset.scssファイルを読み込む

application.scssに読み込むことでアプリケーション全体に適用される様になる

今日はここまで!
見本サイト

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0