0
0

More than 1 year has passed since last update.

Railsでアプリを新規作成

Last updated at Posted at 2022-12-10

railsを勉強し始めたばかりなので、忘れないようにメモとして残します。

バージョン

Ruby:2.7.7
Rails:7.0.4

最初に行うこと

ターミナルで以下のプログラムを叩く。

rails new アプリ名

諸々のインストールが完了したら、$ cd アプリ名でフォルダに移動。

サーバーが動いているか確認する

rails server
  • server("s"と省略しても大丈夫) の後ろに-b 0.0.0.0 をつけると外部の仮想環境からアクセスできるようになる。

必要なgemをインストール

エディタでフォルダを開いたら、Gemfileに必要なgemを書き込み保存する。
まだ記述しただけでインストールは完了していないので、ターミナルで以下のプログラムを叩く。

bundle install
  • bundleのみでも可
Bundle complete! 19 Gemfile dependencies, 90 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed.
と表示されたらインストールが完了。

あとは調べながら開発を進めていくだけ!

これから、ログイン機能付きの画像投稿サイトを作りたい。

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