Setting up a ruby on rails project always been a headache for me. The environment of Ruby preferably should be Linux based.
Some quick guide likes for setting up an Ruby On Rails in a Windows machine is given below.
- Install Ruby Version 2+
Download Ruby for windows from the below url and install it.
To verify the installation, go to command prompt, run ruby –v
It should show version.
- Install MySql
Download and install MySQL from below url.
To verify the installation, go to command prompt, run mysql -v
- Install Git
Download and install Git from below url.
To verify the installation, go to command prompt, run git –version
- Install Rails Version 4+
With Ruby installed, you can install all of Rails and its dependencies through RubyGems on the command line:
gem install rails
New versions of Rails can be installed the same way.
- Install bundler
Install bunder by running the following command on terminal
gem install bundler
- Open Command Prompt and Go to project directory
Open command prompt and navigate to your projects directory.
- Run bundle install
This will install all the ruby gems & dependencies of your project.
- Run bundle exec rails s
And it will start and display the local server url and details.
Setting up ruby environment in Windows is always a burden. You can try out Vagrant to setup an environment.