First Rails Application
Build the app
On a machine with a working Rails installation:
- Open up a terminal window, and at the command prompt ($) type:
$ rails new my_app
- Change to the application directory (RAILS.root):
$ cd my_app
- Start the web server:
$ rails server
- Open a browser window and navigate to
http://localhost:3000
Rails Directory Structure
- RAILS.root - my_app
- app - Models, Views and Controllers code
- bin - Helper scripts (bundle, rails, rake)
- config - App, database & route configuration
- db - Database schema and migrations
- Gemfile - Specify the required gems
- lib
- log - Application logging directory
- public - Webroot of the application
- test - Tests - Agile development
- tmp
- vendor
Latest Post
- Dependency injection
- Directives and Pipes
- Data binding
- HTTP Get vs. Post
- Node.js is everywhere
- MongoDB root user
- Combine JavaScript and CSS
- Inline Small JavaScript and CSS
- Minify JavaScript and CSS
- Defer Parsing of JavaScript
- Prefer Async Script Loading
- Components, Bootstrap and DOM
- What is HEAD in git?
- Show the changes in Git.
- What is AngularJS 2?
- Confidence Interval for a Population Mean
- Accuracy vs. Precision
- Sampling Distribution
- Working with the Normal Distribution
- Standardized score - Z score
- Percentile
- Evaluating the Normal Distribution
- What is Nodejs? Advantages and disadvantage?
- How do I debug Nodejs applications?
- Sync directory search using fs.readdirSync