LoginSignup
1
0

More than 1 year has passed since last update.

cloud9でrailsの環境構築をする

Last updated at Posted at 2022-05-01

cloud9でrailsの環境開発を行う際にすることをまとめた。まずはターミナルで

$rails new sample app

と打ち込む。ここのsample appは好きなファイル名でOK!
その後

$cd sample app

で移動したのち

$rails s

でサーバー起動します。無事起動できれば終了です。しかし,以下のようなエラーが出てくるかもしれません。
image.png

対処方法としてはGemfileを編集します。
Gemfileに以下を追記します。

Gemfile
gem 'sqlite3', '~> 1.3.6'

修正前
スクリーンショット 2022-05-01 23.59.10.png
修正後
image.png
7行目を変更しました。変更後,ターミナルで

bundle install

した後再度

rails s

でサーバーを起動します。以下のような画面になれば成功です!
image.png
参考記事
https://note.com/se_no/n/na8210c5fccd5
https://qiita.com/MORITAKENTARO/items/e8d5306a07715db6c4f2

1
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
1
0