Skip to content

Commit 4f9fa43

Browse files
authored
vagrant info was outdated
1 parent 322c2c0 commit 4f9fa43

File tree

1 file changed

+2
-101
lines changed

1 file changed

+2
-101
lines changed

README.md

Lines changed: 2 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ and Rails 5 in a Virtual Box, React JS via create-react-app and connecting the f
1313
- [Downloading create-react-app](#downloading-create-react-app)
1414
- [Creating a Rails API](#rails-api)
1515
- [Create a react frontend](#create-a-react-frontend)
16-
- [Connect the API with React](#downloading-react-into-our-project)
16+
- [Connect the API with React](#downloading-react-into-our-project)]
1717

1818
## Downloading Virtual Box
1919

@@ -24,106 +24,7 @@ and Rails 5 in a Virtual Box, React JS via create-react-app and connecting the f
2424
1. Download VirtualBox 5.2.22 for Mac OSX [here,](https://download.virtualbox.org/virtualbox/5.2.22/VirtualBox-5.2.22-126460-OSX.dmg) or Windows [here](https://download.virtualbox.org/virtualbox/5.2.22/VirtualBox-5.2.22-126460-Win.exe)
2525
2. Run the installer.
2626
3. Download Vagrant for Mac OSX [here,](https://releases.hashicorp.com/vagrant/2.2.0/vagrant_2.2.0_x86_64.dmg) or Windows [here](https://releases.hashicorp.com/vagrant/2.2.0/vagrant_2.2.0_x86_64.msi)
27-
4. Let's create our first enviorment. You can run the script below to keep your rails projects on your Desktop.
28-
29-
```
30-
cd /Desktop && mkdir rails && cd rails && vagrant init
31-
```
32-
33-
5. Download the OS to VirtualBox
34-
35-
```
36-
vagrant box add ubuntu/trusty64
37-
```
38-
39-
6. Double check and make sure our new box is there
40-
41-
```
42-
vagrant box list
43-
```
44-
45-
7. Add this script to the Vagrant File
46-
47-
```
48-
Vagrant.configure("2") do |config|
49-
config.vm.box = "ubuntu/trusty64"
50-
end
51-
```
52-
53-
8. Start the vagrant server
54-
55-
```
56-
vagrant up && vagrant ssh
57-
```
58-
59-
9. Direct yourself to the vagrant directory
60-
61-
```
62-
cd /vagrant
63-
```
64-
65-
10. Add our Bootstrap File
66-
67-
```
68-
mkdir new_project && cd new_project && touch bootstrap.sh
69-
```
70-
71-
11. Copy this script to configure our virtual enviorment
72-
73-
```
74-
#!/usr/bin/env bash
75-
# upgrade and update the system
76-
echo upgrading and updating the system
77-
sudo apt-get update
78-
sudo apt-get -y upgrade
79-
# install node.js for js runtime when using Rails
80-
echo installing nodejs for ExecJS runtime and git
81-
sudo apt-get install -y nodejs
82-
sudo apt-get install -y git
83-
# install RVM
84-
echo installing RVM
85-
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
86-
\curl -sSL https://get.rvm.io | bash -s stable
87-
source /home/vagrant/.rvm/scripts/rvm
88-
rvm requirements
89-
# install Ruby and make 2.3.1 the default
90-
echo installing ruby
91-
rvm install 2.3.1
92-
rvm use 2.3.1 --default
93-
# install Bundler and Rails
94-
echo installing bundler and rails
95-
gem install bundler --no-ri --no-rdoc
96-
gem install rails -v 4.2.7 --no-ri --no-rdoc
97-
# install postgres and its dependencies
98-
echo installing psql and its dependencies
99-
sudo apt-get install -y postgresql postgresql-contrib libpq-dev
100-
```
101-
102-
12. Re-edit the vagrant file for our newest editions + new bootstrap file
103-
104-
```
105-
Vagrant.configure("2") do |config|
106-
config.vm.box = "ubuntu/trusty64"
107-
config.vm.network "forwarded_port", guest: 3000, host: 3000, host_ip: "127.0.0.1"
108-
config.vm.provision :shell, path: "bootstrap.sh", privileged: false
109-
config.vm.provider "virtualbox" do |vb|
110-
vb.customize ["modifyvm", :id, "--memory", "2048"]
111-
vb.customize ["modifyvm", :id, "--cpus", "2"]
112-
end
113-
end
114-
```
115-
116-
13. Open a new tab in your terminal and lets test the vagrant configs
117-
118-
```
119-
vagrant halt && vagrant up --provision
120-
```
121-
122-
14. Last step. whew...! Once your vagrant server is on (vagrant up and vagrant ssh!), check that Ruby and Rails was installed!
123-
124-
```
125-
ruby -v
126-
```
27+
4. I currently use this ALL-IN-ONE rails env that I absolutely adore. Follow instructions <a href="https://github.com/rails/rails-dev-box">here</a>.
12728

12829
## Downloading create-react-app
12930

0 commit comments

Comments
 (0)