https://github.com/bryn-g/coursera-rubyonrails
:mortar_board: Coursera: Ruby on Rails - An Introduction.
https://github.com/bryn-g/coursera-rubyonrails
ruby ruby-on-rails
Last synced: about 2 months ago
JSON representation
:mortar_board: Coursera: Ruby on Rails - An Introduction.
- Host: GitHub
- URL: https://github.com/bryn-g/coursera-rubyonrails
- Owner: bryn-g
- Created: 2017-10-23T11:35:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-31T06:29:38.000Z (over 8 years ago)
- Last Synced: 2025-03-15T23:41:23.657Z (over 1 year ago)
- Topics: ruby, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# coursera-rubyonrails
## Coursera: Ruby on Rails - An Introduction
### development environment set-up
```sh
# trigger macos developer tool install
$ git --version
# install homebrew (non-admin)
$ mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master
| tar xz --strip 1 -C homebrew
# homebrew execution path in .bash_profile
export BREW_HOME=$HOME/homebrew/bin
PATH=$BREW_HOME:$PATH
```
#### ruby
https://gorails.com/setup/osx/10.13-high-sierra
```sh
# install ruby environment
$ brew install rbenv ruby-build
# add rbenv to bash so that it loads every time you open a terminal
$ echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
$ source ~/.bash_profile
# install ruby
$ rbenv install 2.4.2
# set the global version to use everywhere
$ rbenv global 2.4.2
$ ruby -v
```
#### ruby-on-rails
```sh
# install rails
$ gem install rails -v 5.1.4
# need to run rbenv rehash anytime change gems that run from command line
$ rbenv rehash
# new rails application
$ rails new
# run application
$ rails server
```
#### other requirements
```sh
# install phantomjs - headless browser
$ brew install phantomjs
# rspec for unit testing
$ gem install rspec
$ gem install rspec-its
# http and restful web services
$ gem install httparty
$ gem install webmock
# real user simulation tests
$ gem install capybara
# phantomjs driver for capybara - allows headless tests on webkit browser
$ gem insall poltergeist
```
### zip command used for final assignment submission
```sh
# zip the rails application and exclude some unecessary files
zip -r recipefinder.zip *
-x ".DS_Store/*" -x "tmp/*"
-x "*/development.log" -x "*/development.sqlite3"
-x "*/2*_create_recipes.rb" -x "Gemfile.zip"
```
```ruby
end.
```