Ruby on Rails
Runy
Ruby is a strong, dynamically typed, multi-paradigm interpreted programming language with automatic memory management. It is primarily object-oriented, but can also be functional.
Rails
Rails is a free framework that promises to increase speed and ease in developing database-driven websites, as it is possible to create applications based on pre-defined structures.
It's a great backend language.
def self.hello(name = 'World')
"Hello, #{name}!"
end
end
Ruby is based on MVC.
Install Ruby
Install Rails
Install Ruby on Rails on Windows:
The easiest way is to use rubyinstaller.
Download the installer from the website: https://rubyinstaller.org/
Download the version with DevKit.
Note: DevKit comes with the MSYS toolchan, comes with some libraries and allows compilation.
Run the installer.
Accept the license.
Choose the installation folder.
Check all options.
Leave it checked to run MSYS2 after installing Ruby.
When installing MSYS2, click enter twice.
irb(main) puts “Ola mundo.”
redirect 301 in Ruby on Rails
headers["Status"] = "301 Moved Permanently"
redirect_to "http://www.your-new-site.com.br/"
end