Ruby on Rails, often shortened to Rails, is an open source full-stack web application framework for the Ruby programming language.
Twitter Bootstrap is a free collection of tools for creating websites and web applications.
Today I will use Rails and Bootstrap to start a blog web application, just a few lines of command, you can create a simple and beautiful blog web, now let's start.
First, open the Terminal, we have to create a new rails application named blog.
Twitter Bootstrap is a free collection of tools for creating websites and web applications.
Today I will use Rails and Bootstrap to start a blog web application, just a few lines of command, you can create a simple and beautiful blog web, now let's start.
First, open the Terminal, we have to create a new rails application named blog.
rails new blogthen we use scaffolding to create a post scafflod and connect to the database.
cd blog rails generate scaffold Post title:string content:text rake db:migratethen we add the bootstrap to the application, open the Gemfile in the blog forder, and add the gem.
group :assets do gem 'twitter-bootstrap-rails' endthen we run the command to install the gem.
bundle installand it is time to use the bootstrap make the application look beautiful.
rails generate bootstrap:install static rails g bootstrap:layout application fixed -f rails g bootstrap:themed Posts -fat last, you have to open the web server
rails serverNow, just enjoy you blog application in your web browser through http://localhost:3000/posts
1 comments:
Thank you - super simple instructions.
ReplyPost a Comment
Note: Only a member of this blog may post a comment.