Skip to content

Instantly share code, notes, and snippets.

@RyanB1303
Last active November 18, 2021 01:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanB1303/c82332e158f35978a231f0142c0250d8 to your computer and use it in GitHub Desktop.
Save RyanB1303/c82332e158f35978a231f0142c0250d8 to your computer and use it in GitHub Desktop.
Ruby on Rails for Windows 10 -- with postgresql 13
# Installation
* install uru
* Install ruby ( for first time ) using ruby installer for windows
* get the version with devkit
* install ruby, don't add to path
* uru admin add rubypath/bin
* uru thehashfromadminadd
* ruby -v
* copy msy64 folder to top level folder , eg: c:\mysys64
# Problem
* won't work with postgresql
* pq gem causing so much trouble
* if the first installation is 64 bit, install the alternative version using 64 bit too
# Solution
* use ruby2.7 -> i think msys64 works better with this version
* install pg gem first -> gem install pg
* install using with option for safer result -> gem install pg -- --with-pg-config='C:\Program Files\PostgreSQL\13\bin\pg_config.exe'
* this solution tested using Windows 10 pro x64, uru v0.8.5 [windows/386 go1.10], ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x64-mingw32], msys2-runtime 3.2.0-14, Rails 6.1.4.1
# Additional
* install nodejs + yarn
* gem install bundler
* gem install rails
@RyanB1303
Copy link
Author

Notes

  • VSCode Ruby will still look in system path version
  • I can't change system path with uru
  • use uru auto to auto change ruby version from .ruby-version file
  • Solargraph, Ruby Test Explorer will always look in ruby defined system path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment