The more robust method is to install the Linux subsystem on Windows 10, then use Linux commands to install Ruby. This process uses the latest version from the Ruby Developer Download page.
There are multiple options on this page. If you only need to run Ruby applications, use the version Without Devkit. Use a web browser to navigate to the Download page linked above. If no specific version is needed, select the bolded option: Save the file and remember its location. A Setup dialog launches and displays the License Agreement.
Review it, tick the box to accept the agreement, then click Next. The installer asks to adjust the installation location and associated file types. Leave the defaults selected, unless the system requires differently, then click Install. The system prompts to select components.
Leave the default settings, and click Next. The Setup dialog runs for several minutes. A black command-line-style window appears, labeled RubyInstaller2 for Windows.
Select the components to install. Press Enter to install the default tools. If you have any terminal windows open, close them. Open a new terminal window, and enter the following:. The system takes a few moments to enable the feature. Then, make sure to reboot the system for the changes to take place. Running that opens a terminal window and kicks off the setup steps for this mini Linux install.
There are only two steps: enter a username and a password. They can be the same as your Windows username and password or different. After setting that up, you should have a working Bash prompt!
There are lots of tutorials online about how to use the Linux command line. From here on, you could probably follow any tutorial on installing Ruby on Ubuntu. Read on for specific steps to Ruby joy. The easiest way to install Ruby on Ubuntu is with a package manager. Run the following in your Bash terminal:. This will fetch a bunch of packages and then ask you to make sure you want to install them. You can just hit enter to say yes. Then comes more waiting!
This is almost the same list as we got with RubyInstaller. In particular, Rails wants to use the Nokogiri gem for parsing HTML, and that requires compiling its native extensions. Luckily, apt has an SQLite library that fits the bill: libsqlite3-dev. Finally, Rails uses Node. Go ahead and allow it and watch the gems fly by. Compiling Nokogiri will take a bit of time as well.
With Rails installed, you are ready to generate your first Rails app. But before we do that, you should know something about working with files in the Linux Subsystem.
You can create a file there and then search for it in Windows Explorer. It will also install gems just for your app. In the early years of Rails, developers found that it was problematic working on several Ruby or Rails apps on the same machine and needing different versions of the same gems per app. Bundler came along to solve this problem. Whichever approach you took, you should now have a functioning Ruby install on your Windows machine.
This would be similar to the WSL approach, but you could install a desktop Linux distro so that you can interact with the UI. Vagrant uses VM software, but it allows you to choose from ready-to-go machine images and has a way to make the code on your Windows machine visible to the VM.
Another thing to consider as you sail away on your Ruby journey: what should you do when you wind up working on multiple Ruby projects that require different versions of Ruby? Ask Question. Asked 8 years, 2 months ago. Active 6 years, 4 months ago. Viewed 1k times. My goal is to get LustyJuggler to work. Ingo Karkat k 15 15 gold badges silver badges bronze badges. You shouldn't be surprised, 7. This looks like a bug worth reporting.
Add a comment. Active Oldest Votes. Stefan van den Akker 5, 7 7 gold badges 41 41 silver badges 58 58 bronze badges. Oleg Tsymbalyuk Oleg Tsymbalyuk 1 1 gold badge 3 3 silver badges 9 9 bronze badges. I used WinHex hex editor. But this one is proprietary. You could find some free hex editor here en. This worked for me. It's an ugly procedure but seems to work for me.
Sign up or log in Sign up using Google.
0コメント