Ask A Question

Notifications

You’re not receiving notifications from this thread.

Setup Windows 10 Discussion

Chris Oliver asked in General
Tecnologia Senatur Tecnologia Senatur

Hi!. I have a problem running a rails server. It's seems that a Thin Server is up and running, but not listening on port 3000

This picture will show you my situation. Please help me!.

Reply
J. Pablo Fernández J. Pablo Fernández
Reply

hey .. did all the things till the final step /
i had some problem so closed the bash screen and turned on again
now when i type ruby -v .. its says it to install same goes for rails everything

so .. far i dnwld everythng is gone ah ???

i dont understand help me

it took nearly 4 hrs fr me to reach final step

Reply

It's likely that everything is installed but your terminal didn't automatically load rbenv again. Double check and make sure that you followed all the rbenv lines correctly to echo the lines into your .bashrc file.

Reply

great article , someone know how to install solidus ecommerce on w10 ussing bash ubuntu? thks

Reply

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/home/rakis/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/byebug-9.0.6/ext/byebug
/home/rakis/.rbenv/versions/2.3.1/bin/ruby -r ./siteconf20161113-24750-68ud34.rb
extconf.rb
Cannot allocate memory - /home/rakis/.rbenv/versions/2.3.1/bin/ruby -r
./siteconf20161113-24750-68ud34.rb extconf.rb 2>&1

Gem files will remain installed in
/home/rakis/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/byebug-9.0.6 for
inspection.
Results logged to
/home/rakis/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0-static/byebug-9.0.6/gem_make.out

An error occurred while installing byebug (9.0.6), and Bundler cannot
continue.
Make sure that `gem install byebug -v '9.0.6'` succeeds before bundling.
run bundle exec spring binstub --all
bundler: command not found: spring
Install missing gem executables with `bundle install`

Reply

Brilliant - all worked v smoothly, like someone else said installing ruby 2.3.1 took ages. You may also need to install rmagick - to do this type sudo apt-get install libmagickwand-dev imagemagick

Reply
Beluan Fil Joseph Qu Beluan Fil Joseph Qu

I got the problem, i'm following your tutorial, but this result after running rails new myapp -d mysql

There was an error while trying to write to
`/home/user/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47`.
It is likely that you need to grant write permissions for that path.
run bundle exec spring binstub --all
bundler: command not found: spring
Install missing gem executables with `bundle install`

Reply

so how do we find the root directory where all the created apps are located?

Reply
Brian Gilbank Brian Gilbank

It will be here: "C:\Users\Your Name\AppData\Local\lxss" to access your projects you will navigate to: "C:\Users\Your Name\AppData\Local\lxss\home\then your new Ubuntu username"

Reply
J. Pablo Fernández J. Pablo Fernández

Any ideas how to access that Ruby binary from Windows? For example, how do I use it as the RubyMine Ruby.

Reply
J. Pablo Fernández J. Pablo Fernández

Serving static files with webrick inside WSL seems to be as slow as it was on Windows. Have anybody experience this? any solutions?

Reply
dan setengahmanusia dan setengahmanusia

please explain to me, i still don't understand, why we don't install rails just using railsinstaller, or some simple easy installer else,,

Reply

Rails dev environment is not native on Windows, which is why you have to go through all the hassle.

Reply

I believe this guy actually reuses some other people's article and copy pasted.After installing ruby-build, when you do an rbenv install a specific version, Bash on Windows cannot create directories for installing the ruby version.

Reply

Nope, wrote it myself, but things are constantly changing with Bash on Windows so these instructions break often.

Reply

After installing everything correctly, I received a "This site can't be reached" error for localhost:3000

Any suggestions?

Reply
Slava Titorovich Slava Titorovich

ALERT !
© If you're using Windows Subsystem for Linux then there are currently some limitations on file system notifications that mean you should disable the spring and listen gems which you can do by running rails new blog --skip-spring --skip-listen.
http://guides.rubyonrails.o...

Reply

I know this is a bit of an older post, but it is one of the few places where someone is doing, more or less, what I'm trying to do. My question is, has anyone successfully done this with jruby? I have tried installing jruby 9000 in my home directory, in the multi-user setup (usr/bin/jruby which are symlinks pointing to /usr/lib/jruby/bin), and using RVM in the home directory. In all cases I get to the point where jruby is installed and seems to run properly, but the gem command simply doesn't work. When I try to run "gem install rails" or "gem install bundler" or "jruby -S gem install..." I get "Unable to download data from https://rubygems.org/ - timed out"

Reply

is it possible to use sublime text somehow? Just wondering

Reply
Daniel Morgoth Kent Daniel Morgoth Kent
Reply
Oluwole Oyekanmi Oluwole Oyekanmi

Thanks for this.. It was quite helpful.

Reply
Dmitrii Evdokimov Dmitrii Evdokimov

As for now this Bash is open for every PC with 64-bit Windows 10 Anniversary Update build 14393 (1607) or later - https://msdn.microsoft.com/...
So I install Ruby 2.4.1 from sources (and run Jekyll 3.4.3).

Reply

Incase you're not able to do rake db:migrate with pgsql try this .

I installed pgsql on local windows and not on ubuntu bash
Then did the following:
Go to you config/environments/development.rb and comment out The Line config.file_watcher = ActiveSupport::EventedFileUpdateChecker,
After this run - rails s or rake db:migrate.

This worked for me and is pretty fast too.
Earlier I was using Vagrant (VM) and this (Ubuntu on bash) is faster than vagrant method,
Just my opinion, Hope it helps :)

Reply
Brian Gilbank Brian Gilbank

What version of postgres did you install on windows?

Reply
Alix Bear Kearney Alix Bear Kearney

It looks like this does not work currently if you've been upgraded to xenial. Specifically, ruby does not appear to install correctly if you close the bash session, and you have to rerun the rvm script every time, in addition to not being able to install the rails gem at all.

Reply
Jonatan Jansson Jonatan Jansson

so go for rbenv?

Reply

When going to locahost:3000 in the browser I get, json response as it it a api:

{"status":500,"error":"Internal Server Error","exception":"#\u003cRuntimeError: Cannot load `Rails.application.database_configuration`:\nCould not load database configuration. No such file - [\"config/database.yml\"]\u003e

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.