简体   繁体   中英

Recommended development web server for Rails 3.1 and Ruby 1.9.2

I have been using Mongrel successfully with rails 2.* and 3.0* development, with ruby 1.8.7.

I recently started working with Rails 3.1 and ruby 1.9.2. I got my test app running with WEBrick. I don't like WEBrick. If I forget and simply close the WEBrick terminal window instead of going into the window and issuing a Control-C to WEBrick, the server port (3000) stays in use, and I can't run 'rails server' again until I log out everything and get WEBrick cleared out of the port table. Mongrel never had that problem.

I do have a build problem with Mongrel and ruby-1.9.2. I get multiple header files in the build, some referring to ruby-1.9.1 and some ruby-1.9.2. What a mess.

What is the recommended development web server for my config, which is 32-bit Ubuntu Natty with Rails 3.1 and ruby 1.9.2?

Webrick works well for me. The only problem I had is that it did not work well with https secure. The solution was to only run https on staging and production, not on development machine.

I use the dev machine only as the server, and develop on Windows machine with Notepad++. I think it works well, after using a horrible Rails IDE. (I used to use Visual Studio and love it.) Access the web page through local IP and port. It's a cheap, fast easy solution for Windows users.

I am running Ubuntu 11.04, Rails 3.07, Ruby 1.92 with RVM, and PostgreSQL. RVM is supposed to make life easy for Ubuntu users, because Ubuntu uses a different version of Ruby.

To kill the server process running on port 3000: xxxx is the value returned from the first line.

$ lsof | grep 3000
$ kill -9 xxxx

This could easily be combined into one line or an alias killserver or similar.

Thanks for the various port listener kill commands, I will construct something simple to clear the WEBrick's irritating habit, and continue to use it. Chasing a development web server issue is low on my priority list; they should just work.

You can see from my questions that my Linux skills don't go very deep into the kernel.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM