loading...

I'm running dev.to source code on Windows

twitter logo github logo ・1 min read

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

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:

  1. Install WSL 18.04 and check for postgre first, use apt install

  2. 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

  3. Install yarn from debsource https://yarnpkg.com/en/docs/install#debian-stable

  4. Install ruby 2.5.1 using gorails tutorial

  5. skip git configuration because I have one already

  6. Install Rails 5.1.6 using gorails tutorial

  7. Fork dev.to git and clone it to my local machine

  8. gem install bundler

  9. gem install foreman

  10. run rbenv rehash

  11. bundle install

  12. bin/yarn --network-timeout 1000000 (I encountered this issue)

  13. Get API keys (algolia only)

  14. 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

  15. if statement timeout, comment the variable out

  16. bin/setup and wait until finished

  17. bin/startup. Running jobs take a while the first time.

  18. Open your Windows Chrome and hit localhost:3000

dev to running on windows

dev to running on windows 2

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 πŸ˜€

twitter logo DISCUSS (2)
markdown guide
 

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 πŸ˜‰

Classic DEV Post from Sep 2 '19

What do you think of minimalist UI?

Nathan Sebhastian profile image
JavaScript Full Stack Developer currently working with fullstack JS using React and Express. Follow me if you’re interested in JS web development stuff

Sore eyes?

dev.to now has dark mode.

Go to the "misc" section of your settings and select night theme ❀️