【자신용】rails로 hello, world!할 때까지의 비망록
Rails 설치에서 hello, world! 출력까지의 복권
※ 전제로 Command line tools를 터미널에서 설치
xcode-select --install
1.rbenv를 사용하여 Ruby와 Ruby on Rails 설치
1-1. Homebrew 설치
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
터미널 스쿠쇼

1-2.rbenv 설치
우선 rbenv 설치
brew update
brew install rbenv
터미널 스쿠쇼

rbenv 설치가 완료되면 rbenv에 경로를 통과
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
터미널 스쿠쇼

1-3.rbenv를 사용하여 Ruby 설치
아래 명령으로 rbenv로 설치할 수있는 Ruby 버전을 확인하십시오.
rbenv install -l
실제로 커맨드를 치면 이런 느낌↓

※실제로는 더 표시됩니다
현재 안정 버전을 확인하려면 ㅋㅋㅋ 루 by광 g. 오 rg에 액세스하는 것이 좋습니다.

※스쿠쇼는 2019년 5월 23일 시점에서의 안정판이므로 최신의 안정판은 ↑의 링크에 실제로 액세스 해 확인해 주세요.
현재 안정판을 확인한 후 rbenv를 사용하여 Ruby 설치
rbenv install 2.6.3
터미널 스쿠쇼

1-4. 기본 루비 설정
rbenv global 2.6.3
터미널 스쿠쇼

1-5.Rails 설치
gem install rails
터미널 스쿠쇼

2. 코드를 편집하는 데 필요한 텍스트 편집기 설치
Atom 에디터 사용하고 있는 사람 많은 인상이므로 그리고 m. 이오 로부터 다운로드.
3.hello, world!를 출력하는 단순한 앱 만들기
3-1. 프로젝트에서 사용할 디렉토리 환경 만들기
이번 프로젝트에서 사용하는 디렉토리
environment
를 작성해, environment 디렉토리로 이동.mkdir environment
cd environment
터미널 스쿠쇼

3-2. 대상 디렉토리 environment에서 애플리케이션 작성
아래 명령의 _5.1.6_에서 rails 버전을 명시 적으로 지정).
rails _5.1.6_ new hello_app```
Traceback (most recent call last):
2: from /Users/masaki-sakamoto/.rbenv/versions/2.6.3/bin/rails:23:in `<main>'
1: from /Users/masaki-sakamoto/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
/Users/masaki-sakamoto/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem railties (= 5.1.6) with executable rails (Gem::GemNotFoundException)
명령을 실행하면 GemNotFoundException이라는 오류가 발생했습니다.
gem install rails -v 5.1.6
3-3.rails s 명령으로 hello, world! 출력
만든 hello_app 디렉터리로 이동하여
hello_app
명령을 실행합니다.rails s
응용 프로그램을 보려면 로컬 서버의 경우http://localhost:3000/를 브라우저에서 엽니다.
※Ctrl+C를 누르면 서버를 종료할 수 있다
실제로 열면 이런 느낌↓
스쿠쇼

용어 요약
후일 추기 예정
참조 링크
Rails Girls 설치 레시피
첫 번째 애플리케이션
rails 자습서의 오류
Reference
이 문제에 관하여(【자신용】rails로 hello, world!할 때까지의 비망록), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/mSakamoto/items/3f52aee07951deb00488텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)