Hello everyone,
My name is Nathan and I'm currently looking to contribute to interesting OSS. Since I have windows machine for development with WSL installed, I think I'll start with helping Windows documentation.
I've followed the documentation and gorails tutorials, right now the site is running fine on my localhost. For more details, you can see my comment on the issue
Comment for #306
Hi everyone,
I'd like to help contribute to dev.to, and since I have windows machine for development with WSL, I think I'll start here. I've followed the documentation and gorails tutorials, right now the site is running fine on my localhost. Here are the outline of the steps I did to run it:
-
Install WSL 18.04 and check for postgre first, use apt install
-
Install NodeJS 8 from debsource
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejs
If npm -v give Syntax error: word unexpected (expecting "in"), you can try restart the terminal. It works for me
-
Install yarn from debsource https://yarnpkg.com/en/docs/install#debian-stable
-
Install ruby 2.5.1 using gorails tutorial
-
skip git configuration because I have one already
-
Install Rails 5.1.6 using gorails tutorial
-
Fork dev.to git and clone it to my local machine
-
gem install bundler
-
gem install foreman
-
run
rbenv rehash
-
bundle install
-
bin/yarn --network-timeout 1000000 (I encountered this issue)
-
Get API keys (algolia only)
-
Configure database.yaml for to connect to postgresql run in Windows instead of Ubuntu. make sure it looks like the following
development: <<: *default database: PracticalDeveloper_development host: localhost username: postgres password: root
you have to add host: localhost else Rails will look to connect to Unix Postgres and not Windows. Postgres in WSL still have some issues. Look at this issue
-
if statement timeout, comment the variable out
-
bin/setup and wait until finished
-
bin/startup. Running jobs take a while the first time.
-
Open your Windows Chrome and hit localhost:3000
I haven't done anything except browsing around, will include other API keys and try to sign up later, see if console spawn some errors. I hope this helps.
Feel free to reach me out if more information is needed :)
PC details: OS: Windows 10x64 WSL: Linux Ubuntu 18.04 Bionic Beaver
This is also my first post, so nice to meet you all π
Top comments (2)
Well actually... You're running dev.to on Linux on Windows π
What an awesome first contribution, sharing your setup instructions!
Hello Mike, I didn't try to run the source directly on Windows because I've had run a ruby app before.. I was never able to get pass installing the required gems because some incompatibility between ruby dev kit and Windows.
Perhaps I will try again without the WSL later.
Thanks for the comment π