Skip to content

Instantly share code, notes, and snippets.

@astux7
Last active March 8, 2020 20:06
Show Gist options
  • Save astux7/766bce8138688e8248788fe5d69bad81 to your computer and use it in GitHub Desktop.
Save astux7/766bce8138688e8248788fe5d69bad81 to your computer and use it in GitHub Desktop.
Rails Girls commands

Rails Girls

===============================================

Instalation Mac os

===============================================

Update xcode

$ xcode-select --install

Install homebrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install rbenv

$ brew update $ brew install rbenv $ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile $ source ~/.bash_profile

Build ruby with rbenv

$ rbenv install 2.6.3 $ rbenv global 2.6.3

Install rails

$ gem install rails --no-document

Install yarn

$ brew install yarn

Check everything

$ rails -v

if rails 6.x.x.

$ rails new myapp $ cd myapp $ rails server and go to browser http://localhost:3000

Project set up

$ rails new railsgirls $ cd railsgirls

Create Idea scaffold

$ rails generate scaffold idea name:string description:text picture:string

$ rails db:migrate $ rails server and go to browser http://localhost:3000/ideas

Gemfile update

photo lib add to Gemfile $ gem 'carrierwave' $ bundle rails generate uploader Picture

Generate static page

$ rails generate controller pages info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment