My First Rails Application from Ruby on Rails Guides(now with design).
Rails is a web application development framework written in the Ruby language. It is designed to make programming web applications easier by making assumptions about what every developer needs to get started. It allows you to write less code while accomplishing more than many other languages and frameworks. Experienced Rails developers also report that it makes web application development more fun.
-
Check Ruby Version
First, check if you already have Ruby installed. Open the command prompt and type
ruby -v
. If Ruby responds, and if it shows a version number at or above 2.2.2, then type gem --version. If you don't get an error, skip Install Ruby step. Otherwise, we'll install a fresh Ruby.⋅⋅ -
Install Ruby
If Ruby is not installed, then download an installation package from Ruby Installer Site. Follow the download link, and run the resulting installer.⋅⋅
-
Install Rails
With Rubygems loaded, you can install all of Rails and its dependencies using the following command through the command line:
gem install rails
-
Check Rails Version
Use the following command to check the rails version.
rails -v
Output should be like:
Rails 5.1.2
All the Blog Application Files can be found at the 'blog' folder.
-
Clone this repo using your Powershell or (Terminal) by typing this code:
git clone https://github.com/ncleshyne/CBT2--Rails-Sample-Application.git
-
Open Git Bash. Navigate to the path where this downloaded repo is located. Go to the "blog" folder by typing:
$ cd blog
Note: If you haven't installed git yet, go here first.
-
Start a web server on your development machine by running the following in the blog directory:
$ bin/rails server
-
Finally, open the blog application by opening a browser window and navigate to http://localhost:3000. You should be able to see something like this:
Click "BLOG" and prepare to be amazed by the world of Rails!
I included a simple authentication system by Rails. Therefore, clicking "New Article" will prompt you to enter a username and password. Simply type "Nicole" in the username field and "Secret" in the password. That's all. Please enjoy!