2020. 6. 1. 22:30ㆍRails 5 on aws c9
ubuntu:~/environment $ rails -v
Rails 5.0.0
ubuntu:~/environment $
rails new hello_world
ubuntu:~/environment $ cd hello_world/ (cd hel 까지 치고 tab 누르면 자동완성)
ubuntu:~/environment/hello_world $
ls 명령어로 확인 가능 & 좌측 파일트리에서도 확인 가능
ubuntu:~/environment/hello_world $ rails s -b $IP -p $PORT
[에러발생]
Gem::LoadError (Specified 'sqlite3' for database adapter, but the gem is not loaded. Add gem 'sqlite3' to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).):
ubuntu:~/environment/hello_world $ gem install sqlite3 Building native extensions. This could take a while... Successfully installed sqlite3-1.4.2 Parsing documentation for sqlite3-1.4.2 Done installing documentation for sqlite3 after 0 seconds 1 gem installed
계속 에러 뜸
Specified 'sqlite3' for database adapter, but the gem is not loaded. Add gem 'sqlite3' to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
Gemfile에 sqlite3을
gem 'sqlite3', '~> 1.3.0' 으로 수정
그리고 bundle install 실행
ubuntu:~/environment/hello_world $ rails s => Booting Puma => Rails 5.0.7.2 application starting in development on http://localhost:8080 => Run rails server -h for more startup options Puma starting in single mode...
- Version 3.12.6 (ruby 2.6.3-p62), codename: Llamas in Pajamas
- Min threads: 5, max threads: 5
- Environment: development
- Listening on tcp://localhost:8080 Use Ctrl-C to stop
잘 된다!
'Rails 5 on aws c9' 카테고리의 다른 글
6. Layout에 대한 이해 (0) | 2020.06.09 |
---|---|
5. 지금까지 한 것 git 으로 저장하기 (0) | 2020.06.09 |
4. ERB(Embeded Ruby)에 대한 이해 (0) | 2020.06.01 |
3. Static 페이지 만들기 (0) | 2020.06.01 |
1. 레일즈 구조 이해 (0) | 2020.06.01 |