Search code examples
ruby-on-railsruby-on-rails-4webrick

webrick rails server shuts down a few seconds after starting


After days of not being able to run a WEBrick rails server at all, I finally got it up and running only to have it shutdown about 5 seconds after it has started.

This is a completely fresh project created via the commandline. The only changes I made was in the gem file where I commented out a lot of gems, before I did that the server would not even run. Now it will run for a few seconds and then shutdown.

I am used to working with rails on mac and have never had this problem, but recently transitioned to windows and I am having a hard time identifying the exact problem.

If any of you have any ideas or suggestions to how I can resolve this, I would be very grateful

Here is a screengrab: What the error looks like, you can see that the server starts and then stops

Thanks

Peter


Solution

  • How did you install ruby / rails ?

    If you used the ruby installer from rubyinstaller.org, you can try using version 2.1.X (i see you are using 2.2.X right now), because these seem to be stable already:

    If you don’t know what version to install and you’re getting started with Ruby, we recommend you use Ruby 2.1.X installers. These provide a stable language and a extensive list of packages (gems) that are compatible and updated.

    You should also then consider using a 32 bit version, because they say 64 bit is quite new to windows:

    The 64-bit versions of Ruby are relatively new on the Windows area and not all the packages have been updated to be compatible with it. To use this version you will require some knowledge about compilers and solving dependency issues, which might be too complicated if you just want to play with the language.


    If you look over at railsinstaller.org, they are also using ruby 2.1.5 for their latest windows installer package.