This project is archived and is in readonly mode.
"rails server" doesn't start mongrel by default
Reported by Torsten Maul | February 5th, 2010 @ 03:50 PM | in 3.0.2
My environment: Windows XP, Ruby 1.8.7, Rails 3.0.0.beta, Mongrel gem installed
When issueing the command
rails server
in my application path, WEBrick is started, instead of Mongrel.
From looking in the documentation, there seems to be no option for
setting the server. I tried with
rails server mongrel
, but that doesn't work too.
One workaround I've found, is to call
rackup --server mongrel --port 3000
in your application path.Comments and changes to this ticket
-
Kieran P February 6th, 2010 @ 08:42 AM
- Tag set to bug, mongrel, regression, server
+1 Mongrel should be preferred over thin, and then webrick
-
José Valim February 6th, 2010 @ 10:07 AM
- Milestone cleared.
-
Prem Sichanugrist (sikachu) February 8th, 2010 @ 07:43 PM
- State changed from new to open
- Tag changed from bug, mongrel, regression, server to bug, mongrel, patch, regression, server
- Assigned user set to José Valim
The reason why
rails server
use Webrick over Mongrel was because the way gems area specify in the bundler. If you don't specify it in Gemfile, thenrails server
, or Rack more specifically, won't be able to use it.So here, I'm proposing the patch for adding two commented lines suggesting them to put
gem 'mongel'
in case they want to use Mongrel.@Kieran P
Right now, the order of server, or handler, is specify by Rack. I don't know how could I patch that. Please see http://github.com/rack/rack/blob/master/lib/rack/handler.rb#L36 for more information.
-
Prem Sichanugrist (sikachu) February 9th, 2010 @ 08:54 AM
It seems like I need to add
:group => :development
for thatGemfile
. Another patch ... -
Craig Buchek February 9th, 2010 @ 05:05 PM
While I'd prefer Mongrel to be used automatically, Prem's patch to add it (commented out) to the Gemfile seems to be a reasonable solution. The only way I can see to make it automatic would be something like this:
gem "mongrel", :group => :development rescue nil
But I don't know if that would work or make any sense.
-
Prem Sichanugrist (sikachu) February 10th, 2010 @ 01:45 AM
- State changed from open to resolved
Craig Buchek
No, that won't do any good. If you specify that, Bundler would try to load/install the gem anyway.
However, this patch is stale now by this commit from DHH, so I'll mark it as resolved. Seems like if you want to use Mongrel, uncommenting it from Gemfile would be a way to go.
http://github.com/rails/rails/commit/834a45d8a2ae225b775c51d8ae266a...
-
bingbing March 26th, 2011 @ 02:09 AM
- Tag changed from bug, mongrel, patch, regression, server to server, bug, mongrel, patch, regression
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>