aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/server.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use the PORT environment variable for rails serverDavid Cornu2015-08-181-1/+1
|
* Use exist? instead of deprecated exists?Kasper Timm Hansen2015-08-051-2/+2
|
* Add rake dev:cache task to enable dev mode caching.Chuck Callebs2015-08-041-0/+23
| | | | | | | | | | | | | | | | Taken from @Sonopa's commits on PR #19091. Add support for dev caching via "rails s" flags. Implement suggestions from @kaspth. Remove temporary cache file if server does not have flags. Break at 80 characters in railties/CHANGELOG.md Remove ability to disable cache based on server options. Add more comprehensive options: --dev-caching / --no-dev-caching
* remove Rack::Lock for webrickAaron Patterson2015-07-101-11/+1
| | | | constant loading should be thread safe now, so lets remove this
* Remove `config` options from `default_options` in `railties`Nuri Hodges2015-06-261-2/+1
| | | | Fixes #20345.
* Remove ContentLength middleware from the defaults.Aaron Patterson2015-06-171-1/+0
| | | | | ContentLength is not part of the rack SPEC since rack/rack@86ddc7a6ec68d7b6951c2dbd07947c4254e8bc0d If you want it, just add it as a middleware in your config.
* Revert "Merge pull request #19404 from dmathieu/remove_rack_env"Jeremy Kemper2015-03-201-1/+1
| | | | | | | Preserving RACK_ENV behavior. This reverts commit 7bdc7635b885e473f6a577264fd8efad1c02174f, reversing changes made to 45786be516e13d55a1fca9a4abaddd5781209103.
* don't fallback to RACK_ENV when RAILS_ENV is not presentDamien Mathieu2015-03-191-1/+1
|
* Remove unused Rails::Server#log_pathPhill Baker2015-02-161-4/+0
| | | | | | | With refactors to Rails::Sever from v3 to v4, this method is no longer used and is untested. Previous usage: https://github.com/rails/rails/blob/3-2-stable/railties/lib/rails/commands/server.rb#L79 Currently set from: https://github.com/rails/rails/blob/7b75551a1a4539876f878f37a2439cd02f89d961/railties/lib/rails/application/configuration.rb#L69
* Remove debugger supportRafael Mendonça França2015-01-041-12/+0
| | | | | bebugger doesn't work with Ruby 2.2 so we don't need to support it anymore
* Remove the tmp/sessions folder and its clear taskRobin Dupret2015-01-031-1/+1
| | | | | | | | | | Commit 1aea470 introduced this directory but this was at a time when the default way to store sessions was on the file system under the tmp directory. Let's remove references to it from the documentation as well. [Robin Dupret & yui-knk]
* Document that the default for `rails server -b` has changedGodfrey Chan2014-09-221-5/+1
| | | | Fixes #16578
* fix server names [ci skip]Vijay Dev2014-08-221-1/+1
| | | Per feedback in https://github.com/rails/rails/commit/af63e4a2546629c3fb2d53cffb7d4ea0e8663f68#commitcomment-7477636
* Make text consistent in help text of rails server and console commands.Vijay Dev2014-08-211-9/+9
|
* Add ability to extend `rails server` command options parserAndrey Chernih2014-07-111-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | With this change it will be possible to add additional options to the `option_parser` like this: require 'rails/commands/server' module Rails class Server < ::Rack::Server class Options def option_parser_with_open(options) parser = option_parser_without_open options parser.on('-o', '--open', 'Open in default browser') { options[:open] = true } parser end alias_method_chain :option_parser, :open end def start_with_open start_without_open do `open http://localhost:3000` if options[:open] end end alias_method_chain :start, :open end end
* Keep debugger support only for rubies < 2.0.0David Rodríguez de Dios2014-04-081-2/+11
|
* AestheticsRafael Mendonça França2013-11-071-13/+13
|
* Move interrupt information to print_boot_information methodAlex Johnson2013-11-071-4/+1
|
* Extract method refactoring for Rails::Server#startAlex Johnson2013-11-071-24/+38
|
* Make logging to stdout work again with implicit `development` envMarc Schütz2013-10-131-1/+2
|
* Only output Server logs in Developmentschneems2013-09-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now when you start a server via `rails s`, the logger gets extended so that it logs to the file system and also to stdout. This extension behavior is not "intelligent" and if the default logger is already set to output to stdout, then the contents will be received twice. To capture logs in accordance with http://www.12factor.net/logs some platforms require the logs to be sent to standard out. If a logger is set to stdout, and the server is started using `rails server` instead of another method (i.e. `thin start` etc.) then the app will produce double logs. This PR fixes the issue by only extending the logger to standard out in the development environment. So that in production you don't get double logs like this: ``` ActionView::Template::Error (wrong number of arguments (5 for 4)): 1: <% lang_index = 0 %> 2: <div class="row"> 3: <ul class="nav nav-tabs nav-stacked span2" data-tabs="tabs" id="repo-tabs"> 4: <% repos.group_by(&:language).each do |lang, repos| %> 5: <% unless lang == nil %> 6: <li><a href="#<%= "#{lang.parameterize}#{lang.hash}" %>" data-toggle="tab"><%= lang %></a></li> 7: <% end -%> app/views/shared/_repos.html.erb:4:in `_app_views_shared__repos_html_erb___1685450633638247395_70300668607000' app/views/pages/index.html.erb:13:in `_app_views_pages_index_html_erb__2084723628308867770_70300687584880' ActionView::Template::Error (wrong number of arguments (5 for 4)): 1: <% lang_index = 0 %> 2: <div class="row"> 3: <ul class="nav nav-tabs nav-stacked span2" data-tabs="tabs" id="repo-tabs"> 4: <% repos.group_by(&:language).each do |lang, repos| %> 5: <% unless lang == nil %> 6: <li><a href="#<%= "#{lang.parameterize}#{lang.hash}" %>" data-toggle="tab"><%= lang %></a></li> 7: <% end -%> app/views/shared/_repos.html.erb:4:in `_app_views_shared__repos_html_erb___1685450633638247395_70300668607000' app/views/pages/index.html.erb:13:in `_app_views_pages_index_html_erb__2084723628308867770_70300687584880' ``` ATP Railties. Opened against master in favor of #10999
* add notice to server boot messages if using default 0.0.0.0 bindingLuke Wendling2013-05-251-0/+3
|
* More helpful message when starting serverGabe Kopley2013-03-181-1/+1
| | | | v2 of pull request based on feedback from @rafaelfranca, @schneems, and @carlosantoniodasilva
* config.ru uses the effective Rack appYves Senn2013-03-151-0/+1
| | | | | | | | | | We used to pass the Rails::Application subclass to #run. The Rails server then called #to_app to convert that class to the actual Rack application. if you surround `#run` with a call to `#map` the server no longer convertes the class to the instance and we end up with unnecessary delegation calls on every request.
* Stop calling "super" twice in Rails::Server#appCarlos Antonio da Silva2013-03-121-1/+4
| | | | Cache the value of "super" in a variable and use it instead.
* Add ENV['RACK_ENV'] support to rake runner/console/server.kennyj2012-12-061-1/+1
|
* copy the log level from the config settingsAaron Patterson2012-11-091-0/+1
|
* Use Ruby 1.9 Hash syntax in railtiesRobin Dupret2012-10-141-7/+7
|
* add Rack::Lock for webrickAaron Patterson2012-08-211-0/+9
|
* Remove support for rails server RAILS_ENV=env-nameSam Oliver2012-05-301-5/+0
|
* use File.join rather than depend on PathnameAaron Patterson2012-05-231-1/+1
|
* and one more timeAditya Sanghi2012-04-241-1/+1
|
* stamp out ruby-debug19 with extreme prejudice :)Aditya Sanghi2012-04-171-1/+1
|
* fix rails server support of RAILS_ENV variableschneems2012-03-201-0/+5
| | | | | | | When launching rails server from the command line with a rails environment specified such as `rails server RAILS_ENV=production` an error would occur since rails will try to use `RAILS_ENV=production` as it's server. When launching rails with a specified server such as thin `rails server thin RAILS_ENV=production` no error will be thrown, but rails will not start up in the specified environment. This fixes both of those cases
* allow people to specify custom formatters, use the default formatter in ↵Aaron Patterson2012-03-121-0/+2
| | | | production so that PID and timestamp are logged. fixes #5388
* broadcasting to the console and remove file tailing middlewareAaron Patterson2012-01-201-1/+7
|
* do not do reverse lookups on incoming requests for webrick. fixes #4542Aaron Patterson2012-01-191-0/+1
|
* Use toplevel Rack::ContentLengthJeremy Kemper2011-10-191-1/+1
|
* Use again Rack's ContentLength middleware part 2Santiago Pastorino2011-10-181-0/+1
|
* Use again Rack's ContentLength middlewareSantiago Pastorino2011-10-181-1/+0
|
* Fixing Rails::Server#app under Rack::URLMapGuillermo Iguaran2011-06-071-1/+1
|
* Move content length to the server, this brings the same behavior as in rack 1.2.José Valim2011-05-231-0/+1
|
* Take into account the Rack::Server :SSLEnable option when building the ↵Daniel Martin2011-05-061-1/+2
| | | | application's URL
* reduce two method calls per request, 1 to method_missing and one to sendAaron Patterson2011-02-281-0/+4
|
* Allow a PID file to be specified to rails server [#5031 state:resolved]Sudara2010-07-081-0/+3
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Note that 'rails server' allows specifying mongrel, thin, etc [#4845 ↵Trevor Turk2010-06-221-1/+1
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Added absolute path for config.ru as well. Turns out this is also needed to ↵Ryan Duryea2010-06-201-1/+2
| | | | | | | | fix the daemon issue under ruby 1.8.7 [#4531 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Pass rack the absolute path of server's pid fileRyan Duryea2010-06-201-1/+1
| | | | | | | | | When running as a daemon, rack will cd to "/" and paths relative to the root of the rails app aren't valid when rack is setting up. Because of this, "rails server -d" was failing silently when trying to write it's pid file Signed-off-by: José Valim <jose.valim@gmail.com>
* Create tmp directories if required before starting server [#3907 state:resolved]Ravinder Singh2010-03-311-0/+5
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix server environment [#3877 status:resolved]Simo Niemelä2010-02-101-4/+11
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>