-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to execute rails
in WSL(Windows Subsystem for Linux)
#26054
Comments
I suspect that the @a0x can you let me know what
|
RAILS_ENV=production rails s -b [IP of your computer] |
So I had a go at installing Rails 5 on Bash for Windows and this is what I discovered:
Since the first two problems are beyond our control I think the best we can do is add a note to the getting started guide. |
@pixeltrix
As for And of course, using |
Due to the limited support for inotify (microsoft/WSL#216) in WSL the best thing to do at moment is add a note about skipping spring and listen when generating your application in the Getting Started guide. [skip ci] Fixes #26054. (cherry picked from commit 70f2f98)
This should now work in Windows 10 Insider builds >= 14942 |
@bitcrazed where can I get hold of that build? The ISO download page only has 14931 as the latest. I've tried installing that and switching onto the fast ring but it's not updated in 18 hours - will it only update if I've activated the install? |
We tend to only post slow-ring ISO updates at the moment. Be sure to sign-up for Insiders here too: https://insider.windows.com/ if you haven't already. Also make sure to sign-in using your Microsoft ID. |
@pixeltrix Using rails new --skip-spring --skip-listen gives you a working app but I want to know what are we skipping and do it have some shortcoming when compared with normal rails new command? |
I didn't see anybody mention it but to disable file watching you can edit
EDIT: @aac9095 |
Go to you config/environments/development.rb and comment/remove out the last line,.. Use an evented file watcher to asynchronously detect changes in source code,routes, locales, etc. This feature depends on the listen gem.config.file_watcher = ActiveSupport::EventedFileUpdateCheckerthis is new a new method that rails uses to watch changed files, but it doesn't work on WSL |
Hi, I'm on fast track insider build (I think slow ring gets it too) and I think this should be resolved now. Maybe this? https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13469097-support-for-filesystem-watchers-like-inotify I am able to create new rails apps in WSL without skipping Another similar issue related to filewatchers not working, gohugoio/hugo#1772, was also fixed when I upgraded my windows to insider build. I am on build https://betanews.com/2017/03/14/windows-10-creators-update-build-15058/, which gets u1604 out of box. |
For me to comment on the last line ( config.file_watcher = ActiveSupport::EventedFileUpdateChecker) the file(config/environments/development.rb )worked. tanks for the tip. |
Has anyone tried this on Creators Update yet? |
@bitcrazed |
@bitcrazed I'm on build 15063.413. Using these versions for a while. It works as it should. Also, I believe [~] $ ruby -v
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
[~] $ rails -v
Rails 5.1.1 |
@aoozdemir how do we check our build and update to the fixed version? |
|
Steps to reproduce
rvm
and through that I installed ruby-2.3.1 successfully.rails new rails5_demo
, andbundle install
successfully.rails5_demo
dir, I runrails s
.Expected behavior
In the above condition, Rack server should been up and running and listening to 127.0.0.1:3000.
Actual behavior
An Error occured:
System configuration
Rails version: 5.0.0
Ruby version: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
Related Issue
Later I solved it temporarily using the method mentioned in the following issue:
microsoft/WSL#451 (comment)
The text was updated successfully, but these errors were encountered: