To develop a web application using Rails framework, need install some software:
- Ruby
- Rails framework (current version rails 4.2.0 )
- A database system (MySQL, SQLite, PostgreSQL, ...)
- A web server (Use webrick web server on local, in production: apache, nginx, ...)
1. Install ruby
Install ruby on windows and linux2. Install Rails framework
# gem install rails --include-dependencies
3. Create first application
# rails new sample_appIf you want to use MySQL:
# rails new sample_app -d mysql
4. Running
# cd sample_app # rails sThen, open browser and type
http://localhost:3000
* Note:
To use MySQL, install MySQL server and conector(mysql2) on your computer.May you need
Install Node.js
# apt-get install curl # curl -sL https://deb.nodesource.com/setup | sudo bash - # apt-get install -y nodejs
ruby rubyonrails