LoginSignup
0
0

More than 5 years have passed since last update.

Rails tutorial 第一章のまとめ

■バージョンを指定してRailsをインストールする
gem install rails –v 5.1.6

■rails newをしてファイルを作成する
rails 5.1.6 new hello_app

■hello_appのGemfileにライブラリーを設定、インストール
cd hello_app/
Bundle install
※バンドルインストールしないとライブラリーが反映されません。
※hello_appからバンドルインストールしないとエラーでます。

■Railsサーバーを実行する
rails server

■Application controllerにhelloを追加する
def hello
Render html: “hello,world”
end
end

■routingの設定
root “application#hello”
end

■rails serverを起動して"hello,worl"が起動しているか確認
Cloud9ならRUNボタンを押してからrails server

■新しいリボジトリを作成
Git init
■リボにファイルを追加する
Git add –A
■リボの格納ファイルを確認する
Git status
■ステージングに格納されているファイルをコミットさせる
Git commit

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