We want to make it easy for you to create Ruby on Rails applications.
One hurdle we have seen for Rails newcomers is installing and configuring Ruby on Rails on their computers. This tool sets up of a Ruby on Rails development environment. Follow the steps below. If you have questions, please feel free to create an issue (really!).
- Ruby 2.0.0 (binary RVM install)
- Rails 4.latest
- MongoDB
- Redis
- Git
- RVM
- Bundler
- Node.js for the asset pipeline
- System dependencies for nokogiri
Install 3 packages (programs).
-
- choose Operating System specific package
-
- click on system specific link under "VirtualBox platform packages"
-
- click on latest edition
- choose Operating specific package
Windows Users: Go directly to step 2b
In the terminal application,
git clone git://github.com/railsmn/railsmn-dev-box.git
cd railsmn-dev-box
vagrant up
If you would like to have access to the open_camp project files outside of your Vagrant box (ie: to use your favorite text editor on Windows - like Notepad++ or similar) follow these steps before running the 'vagrant up' command.
-
Create a folder on your Windows computer (typically in the Desktop or 'My Documents' directory) - your open_camp project will be accessible from here.
-
In your GithubUI application, clone the repository available at git://github.com/railsmn/railsmn-dev-box.git - see http://windows.github.com/help.html for more info on how to do this.
-
Once downloaded, open the 'railsmn-dev-box' folder on your computer, using File Explorer.
-
Now, go back to the folder you created in Step 1, and copy the FULL PATH
-
Next, we want to edit the 'Vagrantfile' file. Open it with your favorite text editor, and edit the line that reads:
config.vm.share_folder "open_camp_directory", "/home/vagrant/open_camp", "**Windows Folder Path**"
Replace the 'Windows Folder Path' text with the FULL PATH that you copied in Step 4.
IMPORTANT: Windows will, by default, paste something like this
"C:\Users\Mo\Desktop\open_camp_folder"
Make sure that you change out the backwards slashes, and replace them with forward slashes. The end result should look something like this:config.vm.share_folder "open_camp_directory", "/home/vagrant/open_camp", "C:/Users/Mo/Desktop/open_camp_folder"
-
In your Git Shell (ie: Start -> Applications -> Github -> Git Shell), CD into the directory from Step 2 (ie: Where the
Vagrantfile
exists). -
Run the
vagrant up
command.
- More information about this process is available on the Vagrant project's website
The above commands,
- Download the base Linux image
- Create and start the Vagrant Virtual Machine
- Can take anywhere from 3-45 minutes, depending on your machine and internet connection.
In the terminal application,
vagrant ssh # NOTE: now you have SSH-ed into the Vagrant Virtual Machine (VM)
vagrant@rails-dev-box:~$
Using the same SSH connection from Step 3,
rails new open_camp
cd open_camp
Using the same SSH connection from Step 4,
rails server
Open your browser and go to localhost:3000.
To exit SSH connection to Vagrant Virtual Machine,
exit # option 1
# press ^D # option 2
To suspend virtual machine,
# from your computer
vagrant suspend
To resume virtual machine,
# from your computer
vagrant resume
To shutdown/halt virtual machine,
# from your computer
vagrant halt
To resume virtual machine,
vagrant up
To get status of virtual machine,
# from your computer
vagrant status
To completely delete virtual machine,
# from your computer
vagrant destroy # DANGER: all is gone
Please check the Vagrant documentation for more information on Vagrant.
This is a renamed fork of rails-dev-box. Big Thanks to Xavier Noria and other contributors for their efforts. You guys rock. Thanks!