Vagrant-rails sets up a virtual machine for rails development, with ruby 2.0 and the latest stable rails.
-
Install vagrant.
-
Clone this repo.
-
Cd to the cloned directory and run
vagrant up
to initialize the vm and setup rails -
Open a shell on the VM with
vagrant ssh
-
Run
rbenv shell 2.0.0-p247
to select the correct ruby version -
cd to the
/vagrant/
directory. It's a special directory mirroring the directory where your vm is stored. -
run
rails new blog
to create a basic app -
cd in your blog directory and run
rails s
to launch the rails server. Browsing to http://192.168.50.4:3000 should show you the rails welcome page.
It's pretty complicated for a beginner to get started with rails, particularly if you're learning git and unix at the same time. vagrant-rails tries to remove the pain of setting up a base dev environment.