Skip to content

gmkhussain/Ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Install Ruby

  • Goto https://www.ruby-lang.org/en/downloads/
  • Run rubyinstaller-devkit-##.##-x64
  • Open command line and run ruby -v

// Checkout version

ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x64-mingw32]

Install Rails

  • Open CMD gem install rails
  • Check version: rails -v

Keeping Rails Up-to-Date

  • To check updates gem update rails

Create NEW Project

  • rails new <project-name>
  • Once done installing...
  • cd <project-name>
  • Run project rails server

Webpacker configuration file not found - Rails 6.0.0

  • NOTE: If required
  • npm install --global yarn

  • rails webpacker:install

  • Make sure all packages are up to date npm install --check-files

  • Start your Rails server rails s

  • Visit http://127.0.0.1:3000

Ruby On Rails Home Page Custom Default

#config/routes.rb
root "welcome#code"
#app/controllers/welcome_controller.rb
class WelcomeController < ApplicationController
  def code
  end
end
#app/views/welcome/code.html.erb
Hello world!