Skip to content

Instantly share code, notes, and snippets.

@adriagalin
Created February 5, 2018 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adriagalin/f75232080945a81f17245bc8dae86a40 to your computer and use it in GitHub Desktop.
Save adriagalin/f75232080945a81f17245bc8dae86a40 to your computer and use it in GitHub Desktop.
Instructions to create a new app using Ruby on Rails, Postgresql and Twitter Bootstrap

Note: I'm using RVM as my ruby version manager, also yo could use rbenv

  • Check ruby version
ruby -v
  • To update ruby
rvm install ruby --latest OR rvm install ruby 2.5.0
  • Check rails version
rails -v
  • To update rails and other gems
gem update rails OR gem install rails -v 5.1.4
gem update
  • Creating a new rails app using postgresql
mkdir myapp
echo '2.5.0' > myapp/.ruby-version
echo 'myapp' > myapp/.ruby-version
rails new myapp --database=postgresql
cd myapp
  • Run bundle install
bundle update
bundle install
  • Create gitignore file
wget -c https://www.gitignore.io/api/git%2Cvim%2Cruby%2Clinux%2Cmacos%2Crails%2Cvisualstudiocode -O .gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment