Historically it's been pretty complicated, but on Windows 10 it's actually really simple. Just go here, and download your preferred edition of Ruby. It's a really straightforward installation process. At the end just check your Ruby and Rails versions to make sure everything's properly installed.
- Install Ruby On Rails Windows 10 Bash
- Install Ruby On Windows 10
- Install Ruby On Windows 10 Windows 10
- Install Ruby On Windows 10 Mac
First off, sorry for my bad English.
I'm trying to install Ruby 2.3.0 on my system with rbenv via Windows Subsystem for Linux aka Ubuntu on Windows 10. I followed this instruction (but not 100% exactly). but every time I try, It fails to build Ruby with this log.
and this is my installed package list
As you see, I installed X11, tcl, tk but my system can't detect them. Have I done wrong? or it is just a bug?
Any help would be appreciated. Thank you for reading.
2 Answers
1. Install Ruby
First some dependencies for Ruby:
Now for Ruby: there are 3 ways to install, each way conflict with each other, so choose one you think fit yours most or my suggestion: rbenv
Using rbenv (recommend)
Using rvm
From the source
After install Ruby, install Bundler
2. Install Rails
First you need NodeJS:
Then install rails:
If you're using rbenv
, you'll need to run the following command to make the rails executable available:
Now that you've installed Rails, you can run the rails -v command to make sure you have everything installed correctly:
3. Install DB
MySQL:
You can install MySQL server and client from the packages in the Ubuntu repository. As part of the installation process, you'll set the password for the root user. This information will go into your Rails app's database.yml file in the future.
PostgreSQL:
Currently, some bug prevents you from installing Postgres correctly, so I recommend you MySQL for now.
The Postgres installation doesn't setup a user for you, so you'll need to follow these steps to create a user with permission to create databases. Feel free to replace chris with your username.
Final Steps
Now make sure things go right not left
My installation follow this great tutorial: link here.
kenorbInstall Ruby On Rails Windows 10 Bash
truongnmMake sure you have updated your Windows installation - run 'Windows 10 Upgrade Assistant' and install the Windows 10 Creators Update. Anything before this is riddled with bugs and my rbenv
Rails install wouldn't work. If it still won't work after updating Windows to CU then you can always just use rvm
instead. You may need to reinstall everything anyway, as its recommended to reinstall/upgrade Ubuntu if you are using WSL.