Course: Web Engineering
Instructor: Muhammad Samim
Note: Copy and paste commands in terminal after dollar sign ($)
1. Installing gedit plugins
- Press Ctrl + Alt + t to open terminal
- $ sudo apt-get install gedit-plugins
- Type gedit in terminal
- Maximize gedit
- Click on "Edit"
- After clicking on "Edit" click on "Preferences"
- Check "Display line number"
- Check "Display right margin at column and set it 80
- Check "Highlight current line"
- Check "Highlight matching brackets"
- Click on "Editor tab"
- Set Tab width: 2 spaces
- Check "Enable automatic indentation"
- Click on "Plugins tab"
- Check "Bracket Completion"
- Check "Embeded Terminal"
- Check "File Browser Panel"
- Check "Multi Edit"
- Check "Code Comment"
- Check "Find in Files"
- $ sudo apt-get update
- $ sudo apt-get install git-core
- git config --global user.name "YOUR USER NAME"
- git config --global user.email "YOUREMAIL"
- rails generate controller Welcome index
- go to your app directory/app/config/routes
- now add root 'welcome#index' and save
- now go to your app directory app/view/welcome/index.html.erb
- and replace code with
- <h1> Uploading project on Heroku </h1>
- and save it
- $ git init
- $ git add .
- $ git commit -m 'initial commit'
- Go to link https://github.com/
- Sign in
- Click on sign + right up
- Click on "New repository"
- Type Repository name
- Click on "Create"
- Click on Create repository
- $ git remote add origin http://github.com/yourUserName/YouRepository.git
- $ git push -u origin master
- Type your user name of github
- Type your password
- Enter
To check the changes and updates
- $ git status
- $ git add -A
- $ git push origin master
14. Add gem file in Gemfile of your project
- app directory/app/Gemfile
- copy and paste the following gemfile in the end of line.
- gem 'rails_12factor', group: :production
- open your terminal and type $ bundle install
- Check your ruby version by typing command $ ruby -v
- your version on terminal after command must be like ruby 2.3.1 you need to type it like ruby "2.3.1" in your Gemfile of your project
and save
- Visit https://www.heroku.com/ and make an account
- $ wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
- $ heroku login
- Enter your email
- Enter your password
- $ heroku create
- $ git config --list | grep heroku
- $ git push heroku master
- $ heroku run rake db:migrate
- $ heroku ps:scale web=1
- $ heroku ps
- $ open heroku














0 comments:
Post a Comment