You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When committing a Pull Request for non-application/test code please add [`[skip ci]`](http://docs.travis-ci.com/user/how-to-skip-a-build/) to your commit message.
6
4
7
-
## External Dependencies
5
+
#Contributing
8
6
9
-
There are a couple of steps you need to take before contributing:
7
+
Here are the steps for getting setup & started with contributing to CoderWall :
10
8
11
9
1. Go to [https://assemblymade.com/coderwall](https://assemblymade.com/coderwall) and sign up.
12
10
2. Link your GitHub account to your Assembly account in your profile settings.
13
-
3. Create a new WIP at [https://assemblymade.com/coderwall/wips](https://assemblymade.com/coderwall/wips).
11
+
3.[Fork the code](https://github.com/assemblymade/coderwall).
12
+
4. Create a new WIP at [https://assemblymade.com/coderwall/wips](https://assemblymade.com/coderwall/wips).
13
+
5. Get vagrant running
14
+
6. Run the test suite
15
+
7. If you have any issues, jump into chat, introduce yourself and ask or leave a message if no one is around.
16
+
8. Find an [interesting bounty](https://assemblymade.com/coderwall/wips) on Assembly or suggest a new one.
17
+
9. Fork and then issue a PR when you are done referencing the Bounty. (Note: Only PRs from those with valid Assembly account will be merged).
18
+
19
+
You're on your way to having a stake in CoderWall.
14
20
15
-
Then just go ahead, fork the repo & issue a pull request. You're on your way to having a stake in Coderwall.
21
+
## External Dependencies
16
22
17
23
### Stripe configuration
18
24
@@ -32,12 +38,9 @@ You're free to not use Vagrant but by the time you're done setting up you'll pro
32
38
33
39
### How to work on Coderwall using Vagrant on VirtualBox
34
40
35
-
Sure you could download and install all the dependencies, services, and whatnot
36
-
on to your local workstation but ain't nobody got time for that mess.
41
+
Sure you could download and install all the dependencies, services, and what not on to your local workstation but ain't nobody got time for that mess.
37
42
38
-
To save time and headaches we use Vagrant. Vagrant is a automation tool for
39
-
VirtualBox that will help you spin up a virtual environment with pretty much
40
-
everything in place and ready for you to start hacking (even on Windows!)
43
+
To save time and headaches we use Vagrant. Vagrant is a automation tool for VirtualBox that will help you spin up a virtual environment with pretty much everything in place and ready for you to start hacking (even on Windows!)
41
44
42
45
Here's everything you need to get started working on Coderwall with Vagrant TODAY!
43
46
@@ -53,22 +56,23 @@ There's only a VirtualBox basebox right now.
53
56
54
57
#### Vagrant? VirtualBox? Let's take this one step at a time.
55
58
59
+
If you're running Windows, [here's a guide written by one of our members on how to get set up.](https://github.com/assemblymade/coderwall/docs/getting_started_on_windows.md)
60
+
56
61
1.**Install VirtualBox**
57
62
58
63
Grab the VirtualBox installer from **[here](https://www.virtualbox.org/wiki/Downloads)**.
59
64
60
65
_At the time of writing this documentation the current version is VirtualBox 4.3.10._
61
66
62
-
You don't have to install the VirtualBox 4.3.10 Oracle VM VirtualBox Extension Pack
63
-
but I recommend installing it for the extra drivers.
67
+
You don't have to install the VirtualBox 4.3.10 Oracle VM VirtualBox Extension Pack but I recommend installing it for the extra drivers.
64
68
65
69
2.**Install Vagrant**
66
70
67
-
Grab the Vagrant installer from **[here](http://www.vagrantup.com/downloads.html)**.
68
-
71
+
[Vagrant](http://vagrantup.com) is the recommended way to run CoderWall on your own machine. You need to download and install.
72
+
Grab the Vagrant installer from **[here](http://www.vagrantup.com/downloads.html)**.
69
73
_At the time of writing this documentation the current version is Vagrant 1.6.2._
70
-
71
-
Follow the installation instructions for your platform on the Vagrant download page.
74
+
75
+
Follow the installation instructions for your platform on the Vagrant download page.
72
76
73
77
After installing Vagrant we need to add a couple plugins.
74
78
@@ -80,32 +84,27 @@ There's only a VirtualBox basebox right now.
I am going to assume that the project is cloned into your home directory in and into a directory structure like `~/assemblymade/coderwall`.
89
95
90
96
4.**Fire it up! Fire it up! Fire it up!**
91
97
92
-
Now that you've got VirtualBox and Vagrant installed with the source code
93
-
cloned in `~/assemblymade/coderwall` we can start up the Vagrant instance.
98
+
Now that you've got VirtualBox and Vagrant installed with the source code cloned in `~/assemblymade/coderwall` we can start up the Vagrant instance.
94
99
95
100
cd ~/assemblymade/coderwall
96
101
vagrant up
97
102
98
-
You will likely be prompted for your `sudo` password to allow VirtualBox
99
-
to mount the shared folder using NFS.
103
+
You will likely be prompted for your `sudo` password to allow VirtualBox to mount the shared folder using NFS.
100
104
101
-
Since this is probably the first time you're running this command it's going
102
-
to take a VERY long time (bandwidth willing) to run. This is because Vagrant
103
-
needs to fetch the Coderwall base box from the Internet and it's about 1GB.
104
-
Fortunately that really only has to be done once (unless the base box get's
105
-
updated but that's another story).
105
+
Since this is probably the first time you're running this command it's going to take a VERY long time (bandwidth willing) to run. This is because Vagrant needs to fetch the Coderwall base box from the Internet and it's about 1GB. Fortunately that really only has to be done once (unless the base box get's updated but that's another story).
106
106
107
-
Once Vagrant reports that you're booted up and ready to go then you'll be
108
-
able to SSH into the local vm similiar to any other remote box.
107
+
Once Vagrant reports that you're booted up and ready to go then you'll be able to SSH into the local vm similiar to any other remote box.
109
108
110
109
# still in ~/assemblymade/coderwall
111
110
vagrant ssh
@@ -118,60 +117,58 @@ There's only a VirtualBox basebox right now.
118
117
Now that you're SSH'ed into the Vagrant VM it's time to run the app.
119
118
120
119
# we're still SSH'ed into Vbox
121
-
cd ~/web
120
+
cd ~/assemblymade
122
121
rvm current # should be ruby-2.1.0@coderwall
123
122
bundle check # should be a response that everything's good
124
123
bundle exec rails server
125
124
126
125
If all went well the Rails server should start up on PORT 3000.
127
126
128
-
Now go open your favorite web browser on you host machine and
129
-
navigate to `http://localhost:3000`.
127
+
Now go open your favorite web browser on you host machine and navigate to [http://localhost:3000](http://localhost:3000).
130
128
131
-
If all goes well (and if it doesn't then check if another app is
132
-
running on port 3000 and if there's any logging output being displayed
133
-
in the window you were running Vagrant in) then you're going to be
134
-
looking at the Coderwall homepage.
129
+
If all goes well (and if it doesn't then check if another app is running on port 3000 and if there's any logging output being displayed in the window you were running Vagrant in) then you're going to be looking at the CoderWall homepage.
135
130
136
-
Congratulations! NOW GET TO WORK! Enough dilly-dallying with your devenv.
131
+
Congratulations! NOW GET TO WORK! Enough dilly-dallying with your DEV env.
137
132
138
133
5.**Hackety Hack!**
139
134
140
-
Vagrant is powerful not just because it can abstract away the mess of
141
-
managing a crazy, complicated development environment while ensuring everyone
142
-
has a common platform to work on. It's also powerful because it will still
143
-
let you have whatever crazy, complicated editors and tools to work on your
144
-
code while abstracting away the nasty details of installing and configuring Postgres.
135
+
Vagrant is powerful not just because it can abstract away the mess of managing a crazy, complicated development environment while ensuring everyone has a common platform to work on. It's also powerful because it will still let you have whatever crazy, complicated editors and tools to work on your code while abstracting away the nasty details of installing and configuring Postgres.
145
136
146
-
If you're on your host computer and navigate to `~/assemblymade/coderwall` (we're all there, right?)
147
-
and make changes to your code while Vagrant is running you'll be able to see the changes
148
-
reflected in Vagrant immediately. Try this.
137
+
If you're on your host computer and navigate to `~/assemblymade/coderwall` (we're all there, right?) and make changes to your code while Vagrant is running you'll be able to see the changes reflected in Vagrant immediately. Try this.
149
138
150
139
cd ~/assemblymade/coderwall
151
140
echo Hello, `whoami` from `hostname` >> HELLO.txt
152
141
vagrant ssh
153
-
cd ~/web
142
+
cd ~/assemblymade
154
143
cat HELLO.txt #whoa.
155
144
echo Hello, `whoami` from `hostname` >> HELLO.txt
156
145
exit
157
146
cat HELLO.txt # wah-wah-wee-wa!
158
147
rm -f HELLO.txt # yeah, it's deleted in the other spot too.
159
148
160
-
Yeah, that's pretty awesome. Remember that NFS thing we glossed over earlier? That's
161
-
the mechanism that Vagrant set up with VirtualBox to transparently synchronize your
162
-
local folder with the folder on the VM. Now you can edit and manage your files from
163
-
the comfort of your favorite OS without having to worry about copying them to the VM.
149
+
Yeah, that's pretty awesome. Remember that NFS thing we glossed over earlier? That's the mechanism that Vagrant set up with VirtualBox to transparently synchronize your local folder with the folder on the VM. Now you can edit and manage your files from the comfort of your favorite OS without having to worry about copying them to the VM.
164
150
165
-
6.**All done.**
151
+
6.**All done for the day - Turning your Vagrant VM off**
166
152
167
153
When you're ready to call it a day and want to turn the VM off you have two options.
168
154
169
155
You can either "turn the VM off" using `vagrant halt` or you can suspend the VM using `vagrant suspend`.
170
156
171
157
Either way when you're ready to resume working just `vagrant up` and you're good to go.
172
158
173
-
7.**Thanks**
159
+
7. Gems Installation and Database Migration
160
+
161
+
Remember that you are using Vagrant, so if you run ```bundle install``` or ```rake db:migrate``` directly in your terminal it will not affect the virtual machine where CoderWall is running.
162
+
163
+
In order to run these commands, in the virtual machine, all you have to do is to run ```vagrant provision```.
164
+
165
+
8. Environment Variables
166
+
167
+
If you need to change any environment variable you have to edit ```.env``` file properly and restart Rails server running:
168
+
169
+
vagrant ssh -c "sudo restart coderwall"
170
+
171
+
172
+
9.**Thanks**
174
173
175
-
I hope you enjoy working with Vagrant as much as we do and feel free to ask questions
176
-
if you get stuck or have a problem. You're probably not alone and even if you're the
177
-
first to encounter a rough patch you won't be the last.
174
+
I hope you enjoy working with Vagrant as much as we do and feel free to ask questions if you get stuck or have a problem. You're probably not alone and even if you're the first to encounter a rough patch you won't be the last.
Copy file name to clipboardexpand all lines: README.md
-10
Original file line number
Diff line number
Diff line change
@@ -15,16 +15,6 @@ When committing a Pull Request for non-application/test code please add [`[skip
15
15
16
16
Please see our [/master/CONTRIBUTING.md](https://github.com/assemblymade/coderwall/blob/master/CONTRIBUTING.md) for instructions on how to set up your development environment for Coderwall.
17
17
18
-
**TL;DR**
19
-
20
-
1. Create an [Assembly account](https://assemblymade.com).
21
-
2.[Fork the code](https://github.com/assemblymade/coderwall)
22
-
3. Get vagrant running
23
-
4. Run the test suite
24
-
5. If you have any issues, jump into chat, introduce yourself and ask or leave a message if no one is around.
25
-
6. Find an [interesting bounty](https://assemblymade.com/coderwall/wips) on Assembly or suggest a new one.
26
-
7. Fork and then issue a PR when you are done referencing the Bounty. (Note: Only PRs from those with valid Assembly account will be merged).
27
-
28
18
## Built With
29
19
30
20
Coderwall is built from the following open source components:
I wrote this guide after having trouble getting CoderWall to work on my computer. If you're a beginner to this and want to help build, this guide is for you!
4
+
5
+
## First Steps
6
+
7
+
To run CoderWall on Windows you'll need to download and install three programs on your computer. Make sure to have administrator privileges. I believe that your computer should also be 64-bit, not 32-bit. [Here's a guide on how to find out.](http://windows.microsoft.com/en-ca/windows/32-bit-and-64-bit-windows)
8
+
9
+
###[Git](http://git-scm.com/downloads)
10
+
You need Git to be able to clone the CoderWall repository on GitHub. On the installer, make sure to select the option that allows you to use Git in the Windows Command Prompt.
Vagrant needs VirtualBox to create its virtual environment. You might not be able to run VirtualBox if your processor doesn't support virtualization. If you think it does, and later on it doesn't work, your computer BIOS might have disabled the feature. Check out the [Troubleshooting section below.](https://github.com/assemblymade/coderwall/docs/getting_started_on_windows.md#troubleshooting)
14
+
15
+
###[Vagrant](http://vagrantup.com)
16
+
You need Vagrant to be able to create the development environment.
17
+
18
+
Once you've got all that done, restart your computer!
19
+
20
+
## Part Two
21
+
22
+
###Clone the CoderWall repo
23
+
Start the Command Prompt. Type the following in and press enter
24
+
25
+
depending on your choice of protocols : _(this will take a while to run so you may want to grab some coffee)_
Vagrant should now connect and begin to download the box needed to set things up. This will take a bit of time, but only needs to be downloaded once. If you're getting an error message, I've put some troubleshooting stuff below.
40
+
41
+
When you're done, you have a virtual machine box open, and you should be able to access [http://localhost:3000](http://localhost:3000)
42
+
43
+
44
+
## Troubleshooting
45
+
46
+
If Vagrant says that it can't find the `VBoxManage` binary, you will need to set up the path for VirtualBox. Go to Control Panel and find the "System Environment Variables" setting. Then add
47
+
48
+
c:\Program Files\Oracle\VirtualBox
49
+
50
+
to your PATH variable. Make sure to add a semicolon if there are other files listed there already. [There's a good guide on how to set it here.](http://www.computerhope.com/issues/ch000549.htm)
51
+
52
+
If VirtualBox isn't starting up the virtual machine, you might need to edit the BIOS. Entering BIOS is different for each computer manufacturer, so you will need to search that up. After you're able to get into BIOS, the setting to enable 'Virtualization Technology' should be under the 'Security' tab.
53
+
54
+
If you're getting a timeout error, where your computer is unable to connect to the virtual machine, I haven't been able to find a solution to that yet :(
0 commit comments